S
Scott
I created a custom web control and placed a couple instances on an aspx
page. The idea is that the user needs to make a selection in each control
and then click on a button to save the answers in each control to a
database. How can I programmatically scroll through all the controls on the
page to retrieve the values in each custom control? Here is my best shot
which doesn't work, but should give you an idea of what I am trying to do:
Private Sub Button1_Click(ByVal sender ....) Handles Button1.Click
Dim item As Control
For each item in Me.Controls
'Code to check each control to see if we need to save its value.
Response.Write(item.ID.ToString & "<br>")
Next
End Sub.
I need to pick up on the control's ID or type... any suggestions on how I
can do that?
Scott
page. The idea is that the user needs to make a selection in each control
and then click on a button to save the answers in each control to a
database. How can I programmatically scroll through all the controls on the
page to retrieve the values in each custom control? Here is my best shot
which doesn't work, but should give you an idea of what I am trying to do:
Private Sub Button1_Click(ByVal sender ....) Handles Button1.Click
Dim item As Control
For each item in Me.Controls
'Code to check each control to see if we need to save its value.
Response.Write(item.ID.ToString & "<br>")
Next
End Sub.
I need to pick up on the control's ID or type... any suggestions on how I
can do that?
Scott