Solved

Radio Button List

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
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…

821 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