Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
364 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:
Meir Rivkin earned 2000 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Loops Section Overview
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

879 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