Solved

Radio Button List

Posted on 2009-04-09
1
276 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 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