Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void Page_Load(object sender, EventArgs e)
- {
- button.Attributes.Add("onclick", string.Format("if(typeof(Page_ClientValidate)=='function' && !Page_ClientValidate()){return false;}this.value='wait...';this.disabled=true;{0}",
- ClientScript.GetPostBackEventReference(button, string.Empty)));
- }
- protected void ButtonClick(object sender, EventArgs e)
- {
- //in every postback event method
- Page.ClientScript.RegisterOnSubmitStatement(GetType(), "ServerForm","if(this.submitted) return false; this.submitted = true;");
- }
Advertisement
Add Comment
Please, Sign In to add comment