|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
edit a form - retrieve values from db and set checkboxes to reflect value
Hi
I have a feedback form which user completes and data is submitted to db. I then want to allow user to edit this form so I retrieve values from db and populate the textboxes. This is working fine. My question is how do I set checkboxes and radio buttons to reflect these values? It must be something like 'if value is ?? then check the box', but what is the correct syntax and is this code placed within the actual radio box/checkbox? ie. Radio: <input type="radio" name="Gender" <%if strGender = "1" then value="Check Checkbox" %> />Male Checkbox Mail <input type="checkbox" name="ReceiveInfoByMail" value="<%=strReceiveInfoByMail%>" /> Thanks! Lee |
|
#2
|
|||
|
|||
|
input type="radio" name="Gender" <%if strGender = "1" then%>checked="checked"<%end if%> />Male
Cheers, Justin |
|
#3
|
|||
|
|||
|
Thankee, thankee! So exciting when you get something to finally work.
Appreciate it. Cheers Lee-Ann |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > edit a form - retrieve values from db and set checkboxes to reflect value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|