Can elements maintain state after postback

Is there a way to maintain the current state of an html element (whether it's checked or unchecked) when you post back a page? If so, could someone provide an example? None of these elements are in the code behind file, so using Not IsPostBack won't work, unless there's a way to place them there.

Right now, when my page refreshes, all the elements are reset to their defaults.

Thanks.
barnescoAsked:
Who is Participating?
 
Michel PlungjanIT ExpertCommented:
How about a cookie?
0
 
KruleCommented:
Can you post details as to what server side language you are using? Looks like ASP with some VBScript.

The only way, to my knowledge, to save state between refreshes is to somehow post the data to a form, then populate the state of the objects using the form data.  
0
 
HonorGodSoftware EngineerCommented:
You could using something like cookies, or a database
0
 
barnescoAuthor Commented:
Hadn't thought about cookies and using a database might be even better. I've been using hidden variables on page.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.