Is it possible to create Event (for example Button click event) from Source View? I mean without going to design view ?
3 Answers
In your code, you create your method:
protected void Button1_Click(object sender, EventArgs e)
{
}
And in your markup (not the design view), you add your button:
<asp:Button runat="server" OnClick="Button1_Click" />
That should be it.
1 Comment
Paddy
In VB.net, you can use the 'handles' syntax at the end of a method declaration.