Is there any way to preserve the state of the elements on a page (content, state etc) so that they're the same if the user navigates back to the page?

Basically I have one page where the user can alter a bunch of controls, then navigate to another detail page and back. However, when they go back, all the controls on the first page are reset again instead of being the way they left it. How can I retain the state the controls had when the user left the page so it's the same when they go back to it?