Hi,
How to create my own event in c#,a button can have onclick event,onmouseover event is possible? if possible
please explain me with examples.Please explain about events and creating own events in detail.
Thanks in advance.
Events
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Suthish NairRank #92 · 22.8K reputationPosted Apr 13, 2011, 12:31 AM EDT
example:
Button btn = new Button();
btn.Text = "Submit";
btn.Attributes.Add("onmouseover", "alert('1');");
btn.Click += new System.EventHandler(btn_Click);
this.Controls.Add(btn);
private void btn_Click(object sender, EventArgs e) { }
Suthish NairRank #92 · 22.8K reputationPosted Apr 14, 2011, 10:56 AM EDT