Solved

Radio Button List

Posted on 2009-04-09
1
274 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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