按钮单击事件不火 [英] Button Click Event does not fire
问题描述
我有以下ASP-标记:
I have the following ASP-Markup:
<asp:Button runat="server" ID="btnSubmit" meta:resourcekey="btnSubmit" CssClass="submit" OnClick="btnSubmit_Click" />
和以下code-背后:
And the following Code-Behind:
protected void btnSubmit_Click(object sender, EventArgs e)
{
}
由于某些原因,该按钮单击事件不火......它的工作原理上具有完全相同的标记其他网页,我试着做C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319 \\ aspnet_regiis的.EXE -i - 没有做出区别
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.
此外,没有什么AJAXy在本页面回事。
Also, there is nothing AJAXy going on in this page.
任何帮助将大大AP preciated。
Any help would be greatly appreciated.
谢谢,
丹尼斯
推荐答案
尝试禁用ValidationControls,看看事件触发。
Try disabling the ValidationControls and see if the event fires.
也可以尝试加入 CauseValidation = FALSE
您Button的标记。
Also try adding CauseValidation=false
to the markup of your Button.
这篇关于按钮单击事件不火的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!