G
Guest
Hi,
I am using this code to prevent multi click asp.net 2.0 c#,
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("SetValue();");
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(this.Page.GetPostBackEventReference(this.btnSubmit));
sb.Append(";");
this.btnSubmit.Attributes.Add("onclick", sb.ToString());
When I add this code to a page using a masterpage i get an error, "Objected
Expected"
I tried changing "this.disable" to btnSubmit.ClientID + ".disable" but
nothing works.
Thanks
Andre
I am using this code to prevent multi click asp.net 2.0 c#,
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("SetValue();");
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(this.Page.GetPostBackEventReference(this.btnSubmit));
sb.Append(";");
this.btnSubmit.Attributes.Add("onclick", sb.ToString());
When I add this code to a page using a masterpage i get an error, "Objected
Expected"
I tried changing "this.disable" to btnSubmit.ClientID + ".disable" but
nothing works.
Thanks
Andre