sephiith
sephiith

Reputation: 1197

ASP Classic code returning true instead of response.write result

I have a piece of ASP Classic code that instead of response writing my information it returns "true"

Here is the relevant line:

response.write "<a href='search.htm?supplier_name= & request.querystring('supplier_name') & "&aircraft_type=" & request.querystring('aircraft_type') & "&state=" & request.querystring('state') & "&order=state'>State</a>"

I believe the problem is associated with this section:

& "&order=state'>State</a>"

The ASP code in full:

<%
if request.querystring("order") = "state" then 
response.write("State")
else
response.write "<a href='search.htm?supplier_name= & request.querystring('supplier_name') & "&aircraft_type=" & request.querystring('aircraft_type') & "&state=" & request.querystring('state') & "&order=state'>State</a>"
end if
%>

Upvotes: 0

Views: 289

Answers (1)

Paul
Paul

Reputation: 2206

Missing a double quote after supplier_name=:

response.write "<a href='search.htm?supplier_name=" & request.querystring('supplier_name') & "&aircraft_type=" & request.querystring('aircraft_type') & "&state=" & request.querystring('state') & "&order=state'>State</a>"

Upvotes: 2

Related Questions