Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

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
0
VBdotnet2005
Asked:
VBdotnet2005
1 Solution
 
Jai STech 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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now