How to retain the previous page values in asp.net
<p>I am working in asp.net webforms. I am collecting user inputs in a form, say Page1, containing several server controls suchas textboxes, comboboxes and radio buttons. When the user clicks on the save button, a new page, say Page2, will be displayed where all the values entered are displayed for verification. The Page2 is displayed by Server.Transfer("~/Page2") method in the button click event of Page1. In Page2, the user entered values are obtained by reading the PreviousPage property as shown below:</p>

<pre><code>var memberData = PreviousPage.dependentData;
</code></pre>

<p>The Page2 has a Cancel button. When the user finds some dataentry error and want to go back to Page1, they could click on this button. The Cancel button click event runs the following code at the client side:</p>

<pre><code>if (confirm('Are you sure to leave this page?')) {
                window.history.back(1);
            }
</code></pre>

<p>The problem is, when the Page1 is reached, all the user entered values are gone. Please let me know how to architect these two pages so that the values in the previous page (Page1) are retained.</p>

<p>Thanks</p>
