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.

Who is Participating?
Michel PlungjanIT ExpertCommented:
How about a cookie?
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.  
HonorGodSoftware EngineerCommented:
You could using something like cookies, or a database
barnescoAuthor Commented:
Hadn't thought about cookies and using a database might be even better. I've been using hidden variables on page.

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.