问题
I have the following ASP-Markup:
<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.
Also, there is nothing AJAXy going on in this page.
Any help would be greatly appreciated.
Thanks,
Dennis
回答1:
Try disabling the ValidationControls and see if the event fires.
Also try adding CauseValidation=false
to the markup of your Button.
来源:https://stackoverflow.com/questions/8487383/button-click-event-does-not-fire