I am trying to use the OnClick property on a custom user control. I have compiled the user control into a DLL. Below are my user control code.
public partial class LabelButtonControl : UserControl{
private void Page_Load(object sender, System.EventArgs e) {
this.btnCaption.Click += new EventHandler(Click);
}
public event EventHandler Click;
protected virtual void OnClick(EventArgs e) {
if (Click != null) {
Click(this, e); // Notify Subscribers
}
}
Go to the complete details ...