# ASP.net Forewarding

**URL:** <https://forum.kirupa.com/t/asp-net-forewarding/178807>\
**Category:** programming\
**Created:** [February 14, 2006, 1:54pm UTC](https://forum.kirupa.com/t/asp-net-forewarding/178807 "2006-02-14T13:54:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fidelity88](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@Fidelity88](https://forum.kirupa.com/u/Fidelity88)\
**Post date:** [February 14, 2006, 1:54pm UTC](https://forum.kirupa.com/t/asp-net-forewarding/178807/1 "2006-02-14T13:54:51Z")

</div>

Im working on an [ASP.net](http://ASP.net) application right now and I would like to foreward to another page after a form submission. But i would like to throw a hidden form field value into the URL of the forewarded page. How would i request it and place it into the URL. If you have any questions just ask. I am very new to [ASP.net](http://ASP.net) so forgive my ignorance.

Here is my code:

```auto

<script language="VB" runat="server">

Dim savePath As String = "./uploads/"
Sub Upload_Click(source As Object, e As EventArgs)

  If Not (uploadedFile.PostedFile Is Nothing) Then
      Dim postedFile = uploadedFile.PostedFile
      Dim filename As String = Path.GetFileName(postedFile.FileName)
      Dim contentType As String = postedFile.ContentType
      Dim contentLength As Integer = postedFile.ContentLength
      Dim ProductID = PostedFile.ProductID

      postedFile.SaveAs(MapPath(savePath) & filename)
      message.Text = postedFile.Filename & " uploaded" & _
        "<br>content type: " & contentType & _
        "<br>content length: " & contentLength.ToString()
        
      Response.Redirect("fileupload2.asp?ID=" & ProductID)
  End If
End Sub 

</script>
 
</head>
<body>
 
<font face="verdana" size=1 color="#34321C">

<b>Upload Picture</b>
<form enctype="multipart/form-data" runat="server">
<input id="ProductID" name="ProductID" type="hidden" value="<%=request("ID")%>">
  Select File to Upload: 
  <input id="uploadedFile" type="file" runat="server">
  <p>
  <input type=button id="upload" 
    value="Upload" 
    OnServerClick="Upload_Click" 
    runat="server">
  <p>
  <asp:Label id="message" runat="server"/>
   

</form>

```

fidelity88
