Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am creating checkboxes dynamically. I want to handle its CheckedChanged event

C#
CheckBox cb = new CheckBox();
cb.ID = dvw["Val"].ToString();
cb.Text = dvw["Txt"].ToString();
cb.AutoPostBack = true;
cb.CheckedChanged += new EventHandler(cb_CheckedChanged)


How to pass parameters to cb_CheckedChanged event?

Thanks
Posted
Comments
[no name] 29-May-13 6:48am    
Why would you want to?

have a look here: CheckBox.CheckedChanged Event[^]. There you'll find an example.
 
Share this answer
 
No, you can't add an extra parameter to an existing event handler.

Find some other way to do what you want to achieve.

Refer - Delegates and Events[^] to explore more.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900