Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Next to the stupidest question ever asked
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

RebelTech
Average Member

USA
613 Posts

Posted - 09 October 2003 :  14:58:36  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
Don't blow coffee out your nose laughing at this one.
How in the hec do I comment out lines in my .asp?
I have tried:
'
'#####
<--
REM

What is bad looking through the different .asp files it looks like a simple ' will do. Yet, I get errors everytime!

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 October 2003 :  15:01:16  Show Profile
' is what you need to comment out a line.

when you look at some comments, you'll see things like '#### or '*** ... all this is is a way to make the comment stand out so that you can find it easily.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 09 October 2003 :  15:10:49  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
quote:
Originally posted by Nikkol

' is what you need to comment out a line.

when you look at some comments, you'll see things like '#### or '*** ... all this is is a way to make the comment stand out so that you can find it easily.



That is a single quotation or apostrophe right? I get errors every time I try. Does spacing or location matter?

Edited by - RebelTech on 09 October 2003 15:11:29
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 09 October 2003 :  15:15:18  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
Example of what I am seeing.

Syntax error

/forum/res_ourlinks.asp, line 94

'this is a comment in ASP
^
Go to Top of Page

sinovuyo
Starting Member

25 Posts

Posted - 09 October 2003 :  15:16:05  Show Profile
spacing does matter
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 09 October 2003 :  15:17:23  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
This was done just as you said. I think and it still gave an error.

Microsoft VBScript compilation error '800a03ea'

Syntax error

/forum/res_ourlinks.asp, line 94

' is what you need to comment out a line
^
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 October 2003 :  15:21:57  Show Profile
spacing does NOT matter. you probably have a & _ on the line before. if you do, that means you are continuing a line and you can't put a comment in the middle of a line.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 09 October 2003 :  15:26:57  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
I do have a
& _
on the line above. I am in the middle of drawing a table. Will it hurt to remove it?
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 09 October 2003 :  15:31:29  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
Ok I think I have it.

I removed the & _

and I added Response.Write to the next line.

Should I feel stupid or blame the code?
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 October 2003 :  15:33:09  Show Profile
if you remove it, remember to put response.write on the line below the comment.... so let's say you had ...

response.write	"<table>" & vbNewLine & _
		"<tr>" & vbNewLine & _
		"<td>" & vbNewLine & _
		"</td>" & vbNewline & _
		"</tr>" & vbNewLine & _
		"</table>" & vbNewLine

but you want to stick a comment in the middle. it would now look like:

response.write	"<table>" & vbNewLine & _
		"<tr>" & vbNewLine & _
		"<td>" & vbNewLine
' this is my commented line
response.write	"</td>" & vbNewline & _
		"</tr>" & vbNewLine & _
		"</table>" & vbNewLine

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 October 2003 :  15:34:45  Show Profile
You shouldn't feel stupid, but you shouldn't blame the code either. What you are working with is basic vbscript syntax. It might benefit you to take a tutorial on the subject or read a reference (like at www.microsoft.com/scripting ).

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 10 October 2003 :  00:59:55  Show Profile  Visit RebelTech's Homepage  Send RebelTech an ICQ Message
Thanks Nikkol. You have been a great help. I saw in another thread someone reccommending a book from the guysfromrolla. I think I will give it a try!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07