ASP.NET 2.0 : C# : How do you code the handlers for control events ? I
read that explicitly adding delegates pointing to a handler method is no
longer necessary.
So what is the new way ?
tdavisjr - 16 Feb 2006 20:02 GMT
If you have a <asp:Button id="button1" runat="server" /> then in your
code behind class you can handle the buttons click event by using:
ControlName_EventName(object sender, EventArgs e)
i.e.
button1_Click(object sender, EventArgs e)
{
//do someting
}
DWS - 17 Feb 2006 01:16 GMT
Select the control and the event in drop down list in IDE code editor window.
Good Luck
DWS
> ASP.NET 2.0 : C# : How do you code the handlers for control events ? I
> read that explicitly adding delegates pointing to a handler method is no
> longer necessary.
>
> So what is the new way ?