How to save form values during postback

I’m writing a ‘TODO’ list.

I need to preserve the checked state of each checkbox for all rows in a table along with the css text-decoration state of the next td’s text in each row, (which has a strike-through when the checkbox in the same row is checked)
How would I save this state so that my form values are not lost during postback/page refresh ?

My rendered html is a table and each checkbox id follows this pattern:-
id=“MainContent_gvTODOList_chkTaskComplete_0” … _1 …_2 for each row (since I’m using an asp:GridView in a content page)
Conceptually, I know that there is a way in jQuery to select a server control client id where the id also specifies an index like this, but can’t for the life of me figure out how it is done.

I am also aware of HTML 5 global storage which along with JSON and an array could be used to preserve the state during postback. Any pointers in that line of enquiry would be appreciated.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.