I am having the same problem with a slight difference. I hope someone can help.
In my aspx page I have the following:
<script>
sub blah()
For intloop = 0 To (intFieldCount - 1)
Dim oCell As New TableCell()
strDateLink = "<input name='" & strInputName & "' type='text' value='" & dtClosureDate.ToLongDateString & "' size='33' rows='1' class='ltk' style='border:none' />"
oCell.Text = strDateLink
oRow.Cells.Add(oCell)
Next
end sub
</script>
A you can see I am building <input> dynamically. Let’s say that the above loops 20 times, each with a different name for the dynamic <input>. How can I transfer these 20 values?
I have the following control in the body of the page.
<asp:Button id="btnPreCloseSumbit" OnClick="TransferFormValues" Text="Submit " runat="server"/>
Which calls
Sub TransferFormValues(Source As Object, E As EventArgs)
Dim context As HttpContext = HttpContext.Current
context.Items.Add("strFirstName", TextBox1.Text)
Server.Transfer("body_date_closures_test_output.aspx", True)
End Sub
I guess I don’t understand how to transfer the form input that has a dynamic name.
Sub Page_Load(Source As Object, E As EventArgs)
response.Write("hello<br><br>")
Dim context As HttpContext = HttpContext.Current
Response.Write(context.Items("strFirstName"))
response.Write("<br><br>...")
End Sub
-nbp