Questionier web page

Good evening Experts,
I am trying to build a simple Questionier web page like a link below.
http://www.questionpro.com/akira/showSurveyLibrary.do?surveyID=58&mode=1
How can I loop through all controls - radiobuttionlist, dropdowlist, checkboxes ? is there a better way? I am planing to use Session. Thank you again for all you help.

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click


        If Me.RadioButtonList1.SelectedItem.Selected Then

            Response.Write(Me.RadioButtonList1.SelectedItem.Value)


        End If

    End Sub
End Class
VBdotnet2005Asked:
Who is Participating?
 
Jai SConnect With a Mentor Tech ArchCommented:
dim ctrl as Control
for each ctrl in this.controls
this loop will run for all your controls...
next
0
 
VBdotnet2005Author Commented:
thank you :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.