Solved

Radio Button List

Posted on 2009-04-09
1
273 Views
Last Modified: 2013-11-26
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

0
Comment
Question by:lrbrister
1 Comment
 
LVL 1

Accepted Solution

by:
rito1 earned 500 total points
ID: 24107536
Hi lrbrister,

Try this..



rblContentType.SelectedValue = Request.QueryString("ct")

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Word Directory is not in the drop down list 4 25
Capture logon name 13 46
Need a starter for ETL protocol? 4 42
Automated testing suggestions? 2 28
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now