In C#, is there a simple way to check if any control on a page (textbox or dropdown) has been changed?

In C#, is there a simple way to check if any control on a page (textbox or dropdown) has been changed? Instead of creating an event for each control? Thanks
RedXavier2k4Asked:
Who is Participating?
 
Meir RivkinConnect With a Mentor Full stack Software EngineerCommented:
u can use the same event handler for all the required controls.
this.Ctrl1.Click += new System.EventHandler(this.OnChangeHandler);
this.Ctrl2.Click += new System.EventHandler(this.OnChangeHandler);

Open in new window

the example show Click event but simple change it to the change event, the idea is to pass the same handler function to all the controls.
0
All Courses

From novice to tech pro — start learning today.