Imagine a page with a form input:
Search Criteria: crackers
From: ian@stackoverflow.com
To: list@stackoverflow.com
Subject: How to maintain form state with PRG?
Message: Imagine a page with form input:
Send
After the user clicks Send, the server will instruct to client to Redirect
, as part of the Post-Redirect-Get pattern.
POST /mail/u/compose
HTTP/1.1 303 See Other
Location: https://stackoverflow.com/mail/u/compose
And the client will issue a GET
of the new page. The problem is that some elements of the existing form are lost:
Search Criteria:
It gets worse when there are a few drop-downs, and checkboxes.
How can i maintain form state in using Post-Redirect-Get in ASP.net, given that the viewstate
is then non-existent.