Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Radio Button List

I have a radio button list that bis getting populated with the attached code

I am going to be passing in a QueryString called "ct"

I want the radio buttoin to be selected if its value = Request.QueryString("ct")
Dim conn As SqlConnection
        conn = New SqlConnection(AppSettings("ConnEXO"))
        Dim cmd As SqlCommand = New SqlCommand
        cmd.Connection = conn
        conn.Open()
 
        Dim sql As String
        sql = "select ContentTypeID, Description from dbo.ContentTypes "
        sql = sql & "WHERE Active = 1 "
        cmd.CommandText = sql
 
      
        Dim dr As SqlDataReader
        dr = cmd.ExecuteReader
        rblContentType.DataSource = dr
        rblContentType.DataBind()

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of rito1
rito1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial