I\'m constructing a LinkButton from my codebehind, and I need to assign the onclick to a method, and pass a parameter with it too. I have this so far:
LinkButton
The function prototype for this event is:
protected void lnkdel_OnClick(object _sender, EventArgs _args)
{
LinkButton src = (LinkButton)_sender;
// do something here...
}
Assign it with:
LinkButton lnkdel = new LinkButton();
lnkdel.Text = "Delete";
lnkdel.OnClick += new EventHandler(lnkdel_OnClick);