Using POST to preserve state

M

Mark

I'm aware of how to preserve state using session, application variables,
view state, query strings, etc. I'm told that you can use POST to do a
similar state preservation. How does this work and/or could someone post a
quick example of how to store and retrieve? Thanks in advance.

Mark
 
A

Andrew Robinson

Browsers can either GET or POST data back to the server.

GETs pass data on the query string.
POSTs pass data in the form.

Anytime you have a field in a form that uses the POST method, you are
preserving state using a POST. ViewState stores its data in a hidden field
and is an example of a POST.

-A
 
M

Mark

Thanks. Is there a way to use the POST without including existing form
fields?

Thanks again.

Mark
 
A

Andrew Robinson

Don't think so. A POST posts back the form and will include all fields on
it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top