Connecting Tech Pros Worldwide Help | Site Map

displayed data using radio button

Newbie
 
Join Date: Oct 2008
Posts: 15
#1: Mar 1 '09
Good Day,

I just need help on my programming. I would like to try to retrieved/edit the data i've save using radio button and want it to displayed on radio button for editing or changing the choices.

For example i have 2 radio buttone voice and data. when is save on the database the value of checked button is "1". Then when the use want to change their choices I want to display this radio button that the one with check is the one with value is "1". Please give me some example code for this, i'm just new in asp. thanks in advance.


RJ
Dwagar's Avatar
Newbie
 
Join Date: Feb 2009
Location: Cleveland, Ohio
Posts: 6
#2: Mar 1 '09

re: displayed data using radio button


Give this a shot, just replace RS("Data") with your recordset your using to read the table.

<%
Dim ssel1,ssel2
If RS("Data") = "1" then
ssel1 = " checked"
Else
ssel2 = " checked"
End If
%>

<input type="radio" name="voicedata" value="1"<%=sSel1%>> Voice
<input type="radio" name="voicedata" value="0"<%=sSel2%>> Data
Reply