martindavey
Programmer
Take the following example:
<%
STATUS = Request("Status"
If STATUS = "Show" Then
AGE = Request("Age"
For i = 18 to 21
Response.Write(i)
If i = AGE Then
Response.Write(" = Your Age"
End If
Response.Write("<br>" &vbcrlf)
Next
Else
%>
<form name="myForm" action="thisPage.asp">
<input type="hidden" name="Status" value="Show">
<select name="Age">
<option id="18">18</option>
<option id="19">19</option>
<option id="20">20</option>
<option id="21">21</option>
</select>
<input type="submit" value="Show">
</form>
<% End If %>
When I run this, AGE is correctly retreived from the QueryString, but the 'IF' condition doesn't evaluate to true even though they appear to match.
Is this some sort of string vs. number data type problem - if so, how do I convert one to the other.
Cheers, Martin.
<%
STATUS = Request("Status"
If STATUS = "Show" Then
AGE = Request("Age"
For i = 18 to 21
Response.Write(i)
If i = AGE Then
Response.Write(" = Your Age"
End If
Response.Write("<br>" &vbcrlf)
Next
Else
%>
<form name="myForm" action="thisPage.asp">
<input type="hidden" name="Status" value="Show">
<select name="Age">
<option id="18">18</option>
<option id="19">19</option>
<option id="20">20</option>
<option id="21">21</option>
</select>
<input type="submit" value="Show">
</form>
<% End If %>
When I run this, AGE is correctly retreived from the QueryString, but the 'IF' condition doesn't evaluate to true even though they appear to match.
Is this some sort of string vs. number data type problem - if so, how do I convert one to the other.
Cheers, Martin.