Reputation: 1
ok this is my code in vb.net behind where i am creating the radiobutton -
TD = New HtmlTableCell
Dim rdb As New RadioButton()
rdb.ID = "rdb_ads_" & DR("ID")
TD.Controls.Add(rdb)
TR.Cells.Add(TD)
It displays the radiobutton, but doesnt select single. i can select all at one time. how do i make it to select only 1 at a time. i know its basic for u guys, but will help me a lot
Upvotes: 0
Views: 1747
Reputation: 33173
You need to add the radiobutton to a radio button list control, otherwise you are telling your web form / client form that it doesn't belong to a control list and it is just a radio button sitting on a form.
Dim rl As New RadioButtonList
Dim r As New RadioButton
r.ID = "111"
rl.Controls.Add(r)
Upvotes: 1