Repeater, ImageButton & Firefox

  • Thread starter Thread starter RicercatoreSbadato
  • Start date Start date
R

RicercatoreSbadato

i need help, i have an ImageButton inside the ItemTemplate tag of a
Repeater.
In the code behind i use a DataBound() to assign a CommandName and a
CommandArgument to the ImageButton.

If i use IE all is ok, under Firefox no, it seems that the click event
isn't raised when I click on the ImageButton.

any idea ?
 
the solution is pretty easy.

first read carefully
http://msdn2.microsoft.com/en-us/library/y200hyx2(VS.71).aspx

then if you don't protect the DataBind() of the Repeater by the
if (!this.IsPostBack) {.. }
then every time you'll click on the ImageButton the page will refresh.

strange thing is that with the framework .net 1.1 - if you make the
DataBind() each time - the asp:Button responds correctly to the
events, but the asp:ImageButton doesn't.
 
Back
Top