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
353 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
API v SOA 8 64
make control visible based off other control value 7 45
Removing Version of .NET in Windows 10 17 131
Adding Rows to Grid 4 34
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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