使用ClientScript.GetPostBackEventReference代替Page.GetPostBackEventReference [英] Using ClientScript.GetPostBackEventReference instead of Page.GetPostBackEventReference

查看:147
本文介绍了使用ClientScript.GetPostBackEventReference代替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论坛中,

首页常规ASP .NET »客户端Web开发

位于此处: http://forums.asp.net/130.aspx

祝您愉快!


这篇关于使用ClientScript.GetPostBackEventReference代替Page.GetPostBackEventReference的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆