Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Suppose I've 500 controls in one asp.net page.
which includes textboxes, dropdownlists, checkboxes, radiobuttons etc..

I've changed value of 2 or 3 controls.

Now, on submit button click, I've to pass the values of those controls, whose values are changed. (like here 2 or 3)

how to do this..? please help ASAP

What I have tried:

I've thought of declaring those controls inside one panel, but I don't know what would be the right approach to achieve this.
Posted
Updated 10-Mar-16 16:43pm

You can track changes by comparing the defaultValue for inputs, defaultChecked for checkboxes and defaultSelected for select with their actual value/checked/selected property so that you can get only them.

One article - Keep Track of Modified Values of Controls in a Web Page[^]
 
Share this answer
 
Have a dictionary.
On change of each control, add the control's id and and value to the dictionary.
When Submit, send the dictionary to the next page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900