title: previouspage.findcontrol getting variable from previous page
body: <p>i am trying to retain the value of a variable from a previous page. i believe this is the C# way to do this, but i would like the vb.net way can someone please help:</p>
  
  <pre><code>TextBox myTxt = (TextBox)Page.PreviousPage.FindControl("previousPageTextBox");   
  currentPageTextBox.text = myTxt.Text;
  </code></pre>
  
  <p>i would like to know how to code this in vb.net</p>
  
  <p>i tried this:</p>
  
  <pre><code>Dim myTxt As TextBox = CType(Page.PreviousPage.FindControl("Textbox1"), TextBox)
          TextBox1.Text = myTxt.Text
  </code></pre>
  
  <p>but i got this error msg:</p>
  
  <p>use the new keyword to create an object instance</p>