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
348 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

867 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

15 Experts available now in Live!

Get 1:1 Help Now