Click here to Skip to main content
14,270,368 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 2

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[^]
Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100