Is this a bug?
-
After pending a while trying to figuire out why the ImageButton does not fire events I figuired out it is not calling the postback. Is this by design or is there a reason for it? ImageButton LinkButton [X](javascript:__doPostBack('EditItems1$dl$_ctl1$LinkButton1',''))
-
After pending a while trying to figuire out why the ImageButton does not fire events I figuired out it is not calling the postback. Is this by design or is there a reason for it? ImageButton LinkButton [X](javascript:__doPostBack('EditItems1$dl$_ctl1$LinkButton1',''))
There is no bug in IMageButton. input type="image" does not call the __doPostBack function because it is one of the html4 elements which automatticly posts the form when clicked. As far as events not firing, the following page works fine for me.
<script runat="server" language="c#" > protected void Image_Click( Object sender, ImageClickEventArgs e ) { Result.Text = "Clicked"; } </script> <html><body><form runat="server" > <asp:ImageButton runat="server" OnClick="Image_Click" ImageUrl="foo.jpg" /> <asp:Label runat="server" Id="Result" EnabledViewState="False" /> </form></body></html>