Aaron Bertrand [MVP] wrote on 19 sep 2003 in
"Matthew Louden" <jr********@hotmail.com> wrote in message 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??
http://www.aspfaq.com/2179
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.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)