Using POST to preserve state

  • Thread starter Thread starter Mark
  • Start date Start date
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
 
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
 
Thanks. Is there a way to use the POST without including existing form
fields?

Thanks again.

Mark
 
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

Back
Top