J
John Buchmann
I thought this would not be difficult, but i'm stumped!
I need to iterate through a bunch of form fields, and
read the data (value, text, etc.) from them.
(I need to iterate through them programmatically because
it is not known ahead of time which form fields will be
displayed on the browser. The fields will be displayed
or hidden depending on what the user just clicked.)
So, on my page, i surrounded my .NET form field controls
inside an <aspanel id="Pnl_Container" runat="server">
control. The reasoning is that i could then access the
collection of controls inside of it.
Sub Button_Onclick(obj as Object, e as EventArgs)
dim i as int32
for i = 0 to Pnl_Container.Controls.count - 1
Response.Write(Pnl_Container.Controls.Item(i).id
& "<br>")
Next
End Sub
I can successfully write out the "id" of each 1st level
control. But if a control is a text box, how do I write
out the text inside of it? Or if it is a radio button,
how do i get the "value"? I'm stumped. Please help!
Thanks,
John
I need to iterate through a bunch of form fields, and
read the data (value, text, etc.) from them.
(I need to iterate through them programmatically because
it is not known ahead of time which form fields will be
displayed on the browser. The fields will be displayed
or hidden depending on what the user just clicked.)
So, on my page, i surrounded my .NET form field controls
inside an <aspanel id="Pnl_Container" runat="server">
control. The reasoning is that i could then access the
collection of controls inside of it.
Sub Button_Onclick(obj as Object, e as EventArgs)
dim i as int32
for i = 0 to Pnl_Container.Controls.count - 1
Response.Write(Pnl_Container.Controls.Item(i).id
& "<br>")
Next
End Sub
I can successfully write out the "id" of each 1st level
control. But if a control is a text box, how do I write
out the text inside of it? Or if it is a radio button,
how do i get the "value"? I'm stumped. Please help!
Thanks,
John