Avoid resetting ViewStates with Response.Redirect
<p>In my web application I have two, a ViewState and a Session which hold values, the problem is that I need to reset one and leave the other as it is through a click of a button. If I use <code>Response.Redirect</code> in my button, both the ViewState and the Session are resetted. I tried using if(!IsPostBack) but I don't think this would work in a button event. I would really appreciate your suggestions and help. </p>

<p>CODE:</p>

<p>// There is a ViewState above this code which I have to reset</p>

<pre><code>   protected void Button_Click(object sender, EventArgs e)
   {
       Session["Counter"] = (int)Session["Counter"] + 1; // I do not want to reset this Session.
       Label1.Text = Session["Counter"].ToString();
       Response.Redirect("Page1.aspx"); // If this button is pressed then Session["counter"] is resetted which I don't want to happen


}
</code></pre>

<p>Thanks !!</p>
