asp.net

ASP.Net Disable Submit button onclick after page validation

The below code will Disable Submit button onclick after page validation

string var = ClientScript.GetPostBackEventReference(btnSubmit, "").ToString();
btnSubmit.Attributes.Add("onClick", "javascript :if ( Page_ClientValidate() ){this.disabled=true; this.value='Please Wait...';" + var + "};");

Tags:

Subscribe to RSS - asp.net