[Mono-bugs] [Bug 49622][Wis] New - ImageButton cant be used as a command

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 13 Oct 2003 20:10:51 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=49622

--- shadow/49622	2003-10-13 20:10:51.000000000 -0400
+++ shadow/49622.tmp.6463	2003-10-13 20:10:51.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 49622
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System.Web
+AssignedTo: gonzalo@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ImageButton cant be used as a command
+
+Description of Problem:
+ImageButton cant be used as a command
+
+<%@ Page Language="c#" %>
+
+<html>
+<head>
+
+    <script language="C#" runat="server">
+
+    void Page_Load (Object Sender, EventArgs e) {
+        if (!IsPostBack) {
+		ArrayList ar = new ArrayList ();
+		ar.Add (1);
+		DataList1.DataSource = ar;
+		DataList1.DataBind ();
+	}
+    }
+
+    void DataList_ItemCommand(object Sender, DataListCommandEventArgs e) {
+        string cmd = ((LinkButton)e.CommandSource).CommandName;
+        if (cmd == "select")
+            DataList1.SelectedIndex = e.Item.ItemIndex;
+    }
+
+    </script>
+
+</head>
+<body>
+
+    <h3>Click "Test"</h3>
+    <p>it should post back and say "PASS"</p>
+
+    <form runat=server>
+        <asp:DataList id="DataList1" runat="server"
+OnItemCommand="DataList_ItemCommand">
+              <ItemTemplate>
+               <asp:ImageButton id="ImageButton1" runat="server"
+CommandName="Edit" ImageUrl='blah' AlternateText="Test" />
+              </ItemTemplate>
+              <SelectedItemTemplate>PASS</SelectedItemTemplate>
+
+        </asp:DataList>
+    </form>
+</body>
+</html>
+
+
+
+Actual Results:
+Click "Test" see pass
+
+Expected Results:
+Click "Test", see "pass"