Solved

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

Posted on 2013-10-24
1
345 Views
Last Modified: 2013-10-24
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
0
Comment
Question by:RedXavier2k4
1 Comment
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 39597354
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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now