Posted by: jwalin on: April 7, 2008
protected
void Button1_PreRender(object sender, EventArgs e)
{
string doubleSubmitScript = String.Format(@”if (typeof(Page_ClientValidate) == ‘function’) {{
if (!Page_ClientValidate()) {{ return false; }}
}}
this.value = ‘Please wait…’;
this.disabled = true;
{0};”
, ClientScript.GetPostBackEventReference(BeginButton, String.Empty));
Button1.OnClientClick = doubleSubmitScript;
}