drop down help

  • Thread starter Thread starter Paul C
  • Start date Start date
P

Paul C

Hi
Is it possible with asp to have an item in a drop down box selected if a dim
called name is the same as one of the select items. ie if john is passed to
a dim called name and john is an item in the dropdown then it is selected
Thanks
Paul M
 
Sure.

<%
Dim myValue
myValue = "Test"


if myValue = "Test" then%>
<option selected value="<%=myValue%>"><%=myValue%></option>
<%else%>
<option value="Next Value">Next Value</option>
<%
end if
%>
 
Thanks David
David Berry said:
Sure.

<%
Dim myValue
myValue = "Test"


if myValue = "Test" then%>
<option selected value="<%=myValue%>"><%=myValue%></option>
<%else%>
<option value="Next Value">Next Value</option>
<%
end if
%>
 
Back
Top