简体   繁体   English

按钮点击事件不会触发

[英]Button Click Event does not fire

I have the following ASP-Markup: 我有以下ASP标记:

<asp:Button runat="server" ID="btnSubmit" meta:resourcekey="btnSubmit" CssClass="submit" OnClick="btnSubmit_Click" />

And the following Code-Behind: 以及以下代码隐藏:

protected void btnSubmit_Click(object sender, EventArgs e)
    {
    }

For some reason, the Button Click Event does not fire ... it works on other pages with the exact same markup, I've tried doing "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\aspnet_regiis.exe -i" - didn't make a difference. 由于某些原因,Button Click事件不会触发...它可以在具有完全相同标记的其他页面上运行,我尝试执行“ C:\\ Windows \\ Microsoft.NET \\ Framework \\ v4.0.30319 \\ aspnet_regiis.exe-我”-没有改变。

Also, there is nothing AJAXy going on in this page. 另外,此页面上没有任何AJAXy正在进行。

Any help would be greatly appreciated. 任何帮助将不胜感激。

Thanks, 谢谢,

Dennis 丹尼斯

Try disabling the ValidationControls and see if the event fires. 尝试禁用ValidationControls,然后查看事件是否触发。

Also try adding CauseValidation=false to the markup of your Button. 还要尝试将CauseValidation=false添加到Button的标记中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM