asp.net Button event firing problem
I am using an asp Button the following way:
<asp:Button ID="ButtonSave" runat="server" Text="Save" OnClick="ButtonSave_Click" />
and the code of the handler looks something like this:
protected void ButtonSave_Click(object sender, EventArgs e)
{
Authenticate();
//some other code here
//redirect to certain page here
}
While debugging, I put a breakpo开发者_运维百科int at Authenticate, but it seems that it doesn't enter the function, although the redirection takes place and i don't do any more redirecting in the file only this one. I don't understand what's going on, so if anyone could help i would be very grateful.
There are multiple possible reasons. Four:
- You are not actually surfing to the application (version) that's hooked into the debugger: something that may happen if you're using IIS to host the application at the same time as you're creating debug instances on the fly (check your ports).
- The app has gone 'out of sync'. Rebuild / reload.
- Make sure you're doing a 'debug' build.
- Make sure the options Enable ASP Debugging and Enable ASP.NET Debugging are not set to False
精彩评论