Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How can I pass variables or values from one asp vb code page to another?
  2. Session("myVariable") = "blah"
  3.        
  4. Dim strTest as String = ""
  5. strTest = Session("myVariable")
  6.        
  7. {
  8.           string MyOccupation = "Software Developer";
  9.  
  10.           string url;
  11.           url = "page2.aspx?occupation=" + MyOccupation;
  12.  
  13.           Response.Redirect(url);
  14.  
  15. }
  16.        
  17. {
  18.  
  19.           this.TextBox1.Text = Request.QueryString["occupation"];
  20.           RetrievedValue = this.TextBox1.Text;
  21.  
  22. }