G
guido
I've written a user control to add form fields to a aspx page:
Private Sub buildFields()
'Label1.Text = "building fields at " & System.DateTime.Now()
Dim themeIDField As New TextBox()
themeIDField.ID = "theme_id"
themeNamePlaceholder.Controls.Add(themeIDField)
End sub
....and call this at page_load. I now need to get the name value pairs
of these fields to submit to a DB procedure. I've tried using
request.form iteration:
For i As Integer = 1 To Request.Form.Count - 1
Label1.Text += Request.Form.Keys(i) + " = " +
Request.Form.Item(i) + "<br/>"
Next
....and this works almost - Request.Form.Keys(i) yields "ctl08$
[field_name here] = [value here]"
Where has ctl08$ come from? Is it related to the placeholder that i
replace when building the field?
<td class="cell_label" style="width: 120px; height: 18px">
Theme Name</td>
<td class="cell_info" style="width: 349px; height: 18px">
<asplaceHolder ID="themeNamePlaceholder"
runat="server"></asplaceHolder>
</td>
Private Sub buildFields()
'Label1.Text = "building fields at " & System.DateTime.Now()
Dim themeIDField As New TextBox()
themeIDField.ID = "theme_id"
themeNamePlaceholder.Controls.Add(themeIDField)
End sub
....and call this at page_load. I now need to get the name value pairs
of these fields to submit to a DB procedure. I've tried using
request.form iteration:
For i As Integer = 1 To Request.Form.Count - 1
Label1.Text += Request.Form.Keys(i) + " = " +
Request.Form.Item(i) + "<br/>"
Next
....and this works almost - Request.Form.Keys(i) yields "ctl08$
[field_name here] = [value here]"
Where has ctl08$ come from? Is it related to the placeholder that i
replace when building the field?
<td class="cell_label" style="width: 120px; height: 18px">
Theme Name</td>
<td class="cell_info" style="width: 349px; height: 18px">
<asplaceHolder ID="themeNamePlaceholder"
runat="server"></asplaceHolder>
</td>