title: Response.Redirect(Request.Url.AbsoluteURI) Clearing all user entries
body: <p>I have a page where a user fills in some text boxes which get saved to a SQL database using a Submit button.  The page also contains a button that allows them to upload attachments.  If the user uploads an attachment BEFORE clicking the submit button to save the other data, the values in the text boxes are cleared once the upload routine executes the Response.Redirect(Request.Url.AbsoluteUri).  I have tried saving the values I want to restore into the Session, but I don't seem to be able to restore them.  The debugger shows they are there, but once the Response.Redirect is executed, the next lines are never executed.  I'm brand new to ASP.NET, so I may just be missing something obvious.  Here is the code for the upload procedure:</p>
  
  <pre><code>Protected Sub Upload(sender As Object, e As EventArgs) Handles btnUpload.Click
      Session("Phone") = txtPhone.Text
      Session("Name") = txtName.Text
      Session("Email") = txtEmail.Text
      Session("StartDate") = txtStartDate.Text
      Session("EndDate") = txtEndDate.Text
      Session("Subject") = txtSubject.Text
      Session("Description") = txtDescription.Value
      Dim filename As String = Path.GetFileName(FileUpload1.PostedFile.FileName)
      Dim contentType As String = FileUpload1.PostedFile.ContentType
      Using fs As Stream = FileUpload1.PostedFile.InputStream
          Using br As New BinaryReader(fs)
              Dim bytes As Byte() = br.ReadBytes(fs.Length)
              Dim constr As String = ConfigurationManager.ConnectionStrings("EngineeringRequestsConnectionString").ConnectionString
              Using con As New SqlConnection(constr)
                  Dim query As String = "insert into Attachments values (@id, @Name, @ContentType, @Data)"
                  Using cmd As New SqlCommand(query)
                      cmd.Connection = con
                      cmd.Parameters.Add("@id", SqlDbType.Int).Value = nextId
                      cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = filename
                      cmd.Parameters.Add("@ContentType", SqlDbType.NVarChar).Value = contentType
                      cmd.Parameters.Add("@Data", SqlDbType.VarBinary).Value = bytes
                      con.Open()
                      cmd.ExecuteNonQuery()
                      con.Close()
                  End Using
              End Using
          End Using
      End Using
      hasUpload = True
      Response.Redirect(HttpContext.Current.Request.Url.AbsoluteUri)
      BindGrid()
  
  End Sub
  </code></pre>
  
  <p>The BindGrid() procedure attempts to restore the values from Session but never gets executed.</p>
  
  <pre><code>If hasUpload Then
          txtPhone.Text = CType(Session("Phone"), String)
          txtName.Text = CType(Session("Name"), String)
          txtStartDate.Text = CType(Session("StartDate"), String)
  End If
  </code></pre>
  
  <p>This is my first post on SO. I apologize if in advance if it is not clear enough.</p>