使用ClientScript.GetPostBackEventReference代替Page.GetPostBackEventReference [英] Using ClientScript.GetPostBackEventReference instead of Page.GetPostBackEventReference
问题描述
在使用客户端验证后,我正在使用以下代码来禁用按钮. StringBuilder I am using the following code to disable a button after client side validation has occurred. StringBuilder sbValid = StringBuilder sbValid = new StringBuilder();
sbValid.Append( " if(typeof(Page_ClientValidate)= ='function'){" );
sbValid.Append( "if (typeof(Page_ClientValidate) == 'function') { ");
sbValid.Append( "if(Page_ClientValidate()==假){返回假; }}" );
sbValid.Append( "if (Page_ClientValidate() == false) { return false; }} ");
sbValid.Append( " this.value ='提交. ..请稍候...'; this.style.backgroundcolor ='White';' );
sbValid.Append( "this.value = 'Submitting...Please wait...';this.style.backgroundcolor='White';");
sbValid.Append( "this.disabled = true;" ; ); sbValid.Append( sbValid.Append( 此 .Page.GetPostBackEventReference( .btnSubmit));
sbValid.Append( this.Page.GetPostBackEventReference(this.btnSubmit));
sbValid.Append( ;" );
";");
此 .btnSubmit.Attributes.Add( 推荐答案
感谢您的发帖!我建议将您的问题发布到一个MS论坛中, 这篇关于使用ClientScript.GetPostBackEventReference代替Page.GetPostBackEventReference的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
首页› 常规ASP .NET »客户端Web开发
位于此处: http://forums.asp.net/130.aspx
祝您愉快!