Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

How to select a radiobuttonlist item on load?

  Asked By: Ryan    Date: Dec 23    Category: Asp.net    Views: 1946

I have a radio button list that is populated from a db. What I want to do is
have one of the items selected when the page loads, based on select

How do I go about that? I haven't found a way to get it to select an item at



2 Answers Found

Answer #1    Answered By: Viheke Fischer     Answered On: Dec 23

RadioButtonList1.SelectedValue = 2
if there is a value 2 in RadioButtonList1 then it will be selected

Answer #2    Answered By: Jeanette Greene     Answered On: Dec 23

With ddlGroup
.DataSource = dsPlg.Tables("Plg")
.DataTextField = dsPlg.Tables("Plg").Columns(1).ToString
.DataValueField = dsPlg.Tables("Plg").Columns(0).ToString
.SelectedIndex = 0
End With

Thats u want ?

Didn't find what you were looking for? Find more on How to select a radiobuttonlist item on load? Or get search suggestion and latest updates.