Solved

Radio Button List

Posted on 2009-04-09
1
272 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
Comment Utility
Hi lrbrister,

Try this..



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

Open in new window

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

12 Experts available now in Live!

Get 1:1 Help Now