Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya
 asked on

CheckBox changes not saved ASP.NET and C#

Hello Experts,
In a webpage, I am using GridView control.  The first column in the GridView is a CheckBox.  I click on few CheckBoxes and move to the next page.  When I come back, the value in the CheckBoxes are already lost.  Any idea how can I save the changed values. FYI,  at this point I don't want to save them in a database.  I want to save them in the database at the end.

Thank you very much in advance.
ASP.NET.NET ProgrammingVisual Basic.NETC#

Avatar of undefined
Last Comment
RadhaKrishnaKiJaya

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Naitik Gamit

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Easwaran Paramasivam

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Easwaran Paramasivam

After submitting my answer found above one provided same answer.
RadhaKrishnaKiJaya

ASKER
Thank you Naitik and Easwaran for your help.

Your solution works when CheckBoxes are checked or unchecked on fly.  But in my case the CheckBox values are  populated from the database during page load.  In that case it does not work as expected.  Example, I Uncheck few check boxes in Page 1 and move to Page 2.  When I come back to Page 1, my changes are lost.  At the same time, if I checked some boxes, they are still there.  Any idea how to handle situation like that?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes