comment in ASP page

M

Matthew Louden

I want to know what's the convenient way to comment out a block in ASP
pages? I read a book, and I thought we can use /** */ to comment out the
VBScript in ASP page, but it yields run time error.

All I know is to use ' but this is very slow if I want to comment out a
block? Any suggestions??
 
B

Bob Barrows

Matthew said:
I want to know what's the convenient way to comment out a block in ASP
pages? I read a book, and I thought we can use /** */ to comment out
the VBScript in ASP page, but it yields run time error.

All I know is to use ' but this is very slow if I want to comment out
a block? Any suggestions??

If you're using Interdev, there is an free Add-in available from
http://www.platformdev.com/ that allows you to comment/uncomment blocks,
similar to the functionality in the VB IDE.

HTH,
Bob Barrows
 
E

Evertjan.

Aaron Bertrand [MVP] wrote on 19 sep 2003 in

Two very usefull tips in 2179, Aaron, though they only dependably work
for correct code, and the reason for remarking out in a debug situation
often is deselecting a faulty code.

Suppose you have a spurious "end sub" or "end if" line inside that code ?

=================================

However there is another way,
which most editors [like my EditPad] support:


Select the block of code you want "remarked" including the line before
and excluding part of the last line.
Replace "selected only" all "newline"s with "newline" plus "' "


Response.write "http://www.aspfaq.com/2179"
Response.write "http://www.aspfaq.com/2179"
Response.write "http://www.aspfaq.com/2179"
Response.write "http://www.aspfaq.com/2179"

will become:

' Response.write "http://www.aspfaq.com/2179"
' Response.write "http://www.aspfaq.com/2179"
' Response.write "http://www.aspfaq.com/2179"
' Response.write "http://www.aspfaq.com/2179"

The reverse should be obvious.
 
A

Adrienne

I want to know what's the convenient way to comment out a block in ASP
pages? I read a book, and I thought we can use /** */ to comment out the
VBScript in ASP page, but it yields run time error.

All I know is to use ' but this is very slow if I want to comment out a
block? Any suggestions??

If you're using HTML-Kit [http://www.chami.com/html-kit] you can download
a plug-in [http://www.chami.com/html-
kit/plugins/info/frsvbstyleblockcomment/] that will do this for you. Just
highlight the text, hit the button and it's all commented.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top