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

ASP Response.Write Debugging Headache

Status
Not open for further replies.

rfairy

IS-IT--Management
Jan 13, 2003
14
0
0
GB
I've been looking at this all day, and now I have a large headache, can anyone see where I've gone wrong?

<% if var = &quot;1&quot; then
Response.Write &quot;<a href= &quot;&quot; &Recordset1(&quot;enrolment&quot;) & &quot;&SESSION=7234121865394181&quot; & &quot;s1=&quot; &Recordset1(&quot;stName&quot;) & &quot;>&quot; & &quot;Please click here to continue&quot; & &quot;</a>&quot;
else

if var = &quot;2&quot; then
Response.Write &quot;<a href= &quot;&quot; &Recordset1(&quot;enrolment&quot;) & &quot;&SESSION=9952819590936663&quot; & &quot;s1=&quot; &Recordset1(&quot;stName&quot;) & &quot;>&quot; & &quot;Please click here to continue&quot; & &quot;</a>&quot;
else

if var = &quot;3&quot; then
Response.Write &quot;<a href= &quot;&quot; &Recordset1(&quot;enrolment&quot;) & &quot;&SESSION=6083780287200261&quot; & &quot;s1=&quot; &Recordset1(&quot;stName&quot;) & &quot;>&quot; & &quot;Please click here to continue&quot; & &quot;</a>&quot;


end if
end if
end if %>

That pasted badily I'm afraid. All the recordsets insert ok, but I can't get the syntax write to produce a clean link. I'm sure it's just a &quot; in the wrong place, but after looking at it all day, I've probably gone round in circles.

Any help greatly appreciated.


Rich
 
1) If then syntax is
if var = &quot;1&quot; then
.something...
elseif var = &quot;2&quot; then
.something...
else
.something...
end if

Then you should use Chr(34) being equal to &quot; for your surrounding HTML quotes
eg:
&quot;<a href=&quot; & Chr(34) & &quot;
this outputs <href=&quot;and takes out the mess of quotes that cause your syntax errors



_____________________________________________________________________
onpnt2.gif

[bdaycandle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top