Home All Groups Group Topic Archive Search About

Click once for Image button

Author
16 Dec 2005 12:53 PM
kailas.j.goliwadekar
Hi .

I got the following code for 'click once' for button.

   System.Text.StringBuilder sb = new StringBuilder();
    sb.Append("if (typeof(Page_ClientValidate) == 'function') { ");
   sb.Append("if (Page_ClientValidate() == false) { return false; }}
");
   sb.Append("this.value = 'Please wait...';");
   sb.Append("this.disabled = true;");
   sb.Append(Page.GetPostBackEventReference(btnSubmit));
   sb.Append(";");
   btnSubmit.Attributes.Add("onclick", sb.ToString());


This code works fine for <asp:button   id= "btnSubmit" ....>

But this code doesnot work for <asp:ImageButton id="ImgButton"
ImageUrl="../blah.gif" >

Any help to solve the problem of 'Click once for image button' will be
appreciated.

Thanks,
Kailas

AddThis Social Bookmark Button