D
Daisy
In my user control:
<asp:Button id="btnLogin" runat="server" Text="Login"></asp:Button>
And the code-behind:
protected override void OnInit(EventArgs e)
{
btnLogin.EnableViewState = true;
btnLogin.Click += new EventHandler(btnLogin_Click);
base.OnInit(e);
}
public void btnLogin_Click(object sender, EventArgs e)
{
throw new Exception("Worked!");
}
I tried enabling viewstate (I was told events don't work without it),
because I've set it to default to false in web.config, but still, it never
fires. How do I debug something like this? :-\
It's posting back fine, just never hitting the code in the Click method
<asp:Button id="btnLogin" runat="server" Text="Login"></asp:Button>
And the code-behind:
protected override void OnInit(EventArgs e)
{
btnLogin.EnableViewState = true;
btnLogin.Click += new EventHandler(btnLogin_Click);
base.OnInit(e);
}
public void btnLogin_Click(object sender, EventArgs e)
{
throw new Exception("Worked!");
}
I tried enabling viewstate (I was told events don't work without it),
because I've set it to default to false in web.config, but still, it never
fires. How do I debug something like this? :-\
It's posting back fine, just never hitting the code in the Click method