ASP Syntax Error (was: RE: [thelist] CSS Question - Simple)
Joshua Olson
joshua at waetech.com
Mon Sep 15 15:40:42 CDT 2003
----- Original Message -----
From: "Rob Smith" <rob.smith at THERMON.com>
Sent: Monday, September 15, 2003 4:24 PM
> Take a look at this:
> <%
> Dim strings, doohickey
> doohickey = 1
> strings = "<h1>" & if doohickey = 1 then response.write("Hello") &
> "</h1>"
> response.Write(strings)
> %>
Should be:
<%
Dim strings, doohickey
doohickey = 1
strings = "<h1>"
if doohickey = 1 then strings = strings & "Hello" end if
strings = strings & "</h1>"
response.Write(strings)
%>
Or
<%
Dim strings, doohickey
doohickey = 1
strings = "<h1>%1</h1>"
if doohickey = 1 then
strings = Replace(strings, "%1", "Hello")
else
strings = Replace(strings, "%1", "")
end if
response.Write(strings)
%>
HTH,
<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168
More information about the thelist
mailing list