title: viewstate variable is always available?
body: <p>I was thinking about if a custom made <code>ViewState</code> variable is always available on each page visit (same browser session) (like <code>Session</code> but client-side) or only at a page postback? I know this is client-side data that is always encapsulated with the <code>Request</code> packet and the <code>Response</code> packet from the server. </p>
  
  <p>I was testing this right now, and I did the following:</p>
  
  <p>on Home.aspx:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      ViewState["test"] = "test1";
  }
  protected void Button1_Click(object sender, EventArgs e)
  {
      string test = ViewState["test"].ToString();
  
      Server.Transfer("Default.aspx");
  }
  </code></pre>
  
  <p>And on Default.aspx:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      string test = ViewState["test"].ToString();
  }
  </code></pre>
  
  <p>But I get <code>NullReferenceException</code>. So it means that <code>ViewState["test"]</code> doesn't exists because the <code>ViewState</code> is completely new and regenerated. So my conclusion is that you can use <code>ViewState</code> variables only when doing a form postback (but in fact, you do always a redirect after a form postback, so I can't use ViewState always...).</p>
  
  <p>Am I right with my opinion?</p>