Repeater, ImageButton & Firefox

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 ?
 
R

RicercatoreSbadato

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top