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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code query

Status
Not open for further replies.

derwent

Programmer
May 5, 2004
428
GB
guys, can you tell me what is wrong with the following code?

Code:
<%
if request.querystring("type") = "print" then
response.write ("<link href='/css/print.css' rel='stylesheet' type='text/css'>") else
response.write ("<link href='/css/innovate.css' rel='stylesheet' type='text/css'>")
end if
%>

I get this error

Error Type:
Microsoft VBScript compilation (0x800A0412)
Must be first statement on the line
/default.asp, line 12, column 81
response.write ("<link href='/css/print.css' rel='stylesheet' type='text/css'>") else


Thanks folks
 
The 'else' need to be on the next line

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
aaarrrrggghhhh, can't believe I just did that, thanks

been a long week!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top