Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retain radio button value

Status
Not open for further replies.

NateBOIT

Technical User
Oct 4, 2006
10
US
i have a search form that also has 2 radio buttons. I have the text boxes of the form set to retain the values the user entered by basically setting the input value and the display value the same. However, i need a way to retain the value of the selected radio button after the user presses submit. I know you can do this somehow in PHP with a switch, is there also such a thing in ASP? And what is the syntax?
 
nevermind. Got it.

Code:
<input type="radio" name="SortOrder" value= "ASC"
  <% If Request.Form("SortOrder")="ASC" Then %>
    checked
  <% End if %>
>ASC
<input type="radio" name="SortOrder" value="DESC"
  <% If Request.Form("SortOrder")="DESC" Then %>
    checked
  <% End If %>
>DESC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top