我正在使用 javascript 代码禁用按钮,但我的服务器端事件没有触发..知道吗?
Javascript
------------------------
function DisableButton() {
if (typeof (Page_ClientValidate) == 'function') {
Page_ClientValidate();
}
if (Page_IsValid) {
document.getElementById('<%=BtnToprimaryValidation.ClientID%>').disabled = true;
document.getElementById('<%=BtnToprimaryValidation.ClientID%>').value = 'Please wait ...';
}
}
ASP.Net
-------------------------
<asp:Button ID="BtnToprimaryValidation" runat="server"
meta:resourcekey="BtnToprimaryValidationResource1"
CssClass="submitButton">
Server Side c#
---------------------------
protected void Page_Load(object sender, EventArgs e)
{
BtnToprimaryValidation.Click += BtnToprimaryValidationClick;
}
protected void BtnToprimaryValidationClick(object sender, EventArgs e)
{
}
提前致谢, 拉胡尔 R