title: Cross posting information across pages
body: <p>The way I set my code won't let me obtain information from the previous page.</p>
  
  <p>information on page 1:</p>
  
  <pre><code>public string Name{  get { return FirstName.Text; } private set{} }
  
  public string Email { get { return email.Text; } private set { } }
  </code></pre>
  
  <p>information on page two (to obtain):</p>
  
  <p>Mark up code:</p>
  
  <pre><code>&lt;%@ PreviousPageType VirtualPath="~/Registration.aspx" %&gt; 
  </code></pre>
  
  <p>c# code:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      string name = "";
      string email = "";
      if (PreviousPage != null)
      {
          name = PreviousPage.Name;
          email = PreviousPage.Email;// both fields are always null... why?
      }
  </code></pre>
  
  <p>I changed my last section to this: still wont work</p>
  
  <pre><code>            Response.Redirect("CheckYourEmail.aspx");
      }
      ViewState["LoginName"] = FirstName.Text;
      ViewState["Email"] = email.Text;
      ViewState["Password"] = password1.Text;
  
  }
  
  public string Name { get { return ViewState["LoginName"].ToString() ; } private set { } }
  
  public string Email { get { return ViewState["Email"].ToString(); } private set { } }
  
  public string UserPassword { get { return ViewState["Password"].ToString(); } private set { } }
  </code></pre>
  
  <p>i also tried with Request["Email"];</p>
  
  <p>wont work</p>