Sunday, March 11, 2012

UpdatePanel causes FireFox to not fire event

ok, i figured out that if you set the UseSubmitBehavior=false, it works, but is there a way to accomplish this with an imagebutton?


Hi,

ImageButton will be rendered as input tag of type image, and its default behavior is to submit the form. So, you can't change this as you do for the Button.

You may try this:

ImageButton1.Attributes.Add( "onclick", "__doPostBack('" + ImageButton1.ClientID + "'", '');" );

Hope this helps.


gdogg:

ok, i figured out that if you set the UseSubmitBehavior=false, it works, but is there a way to accomplish this with an imagebutton?

You would have to use ImageButton's OnClientClick property

OnClientClick="this.disabled=true;__doPostBack(this.name,'');"

No comments:

Post a Comment