How to comment multiple lines of code in classic asp at once?I have tried using ' for every line that I want to comment.But, that is not the best way to do I believe.Can someone help me on this?
Asked
Active
Viewed 4,319 times
-1
-
3Possible duplicate of [Server-side comments: What's the equivalent of <%-- --%> in ASP Classic?](http://stackoverflow.com/questions/4431170/server-side-comments-whats-the-equivalent-of-in-asp-classic) – user692942 Oct 15 '15 at 09:08
-
http://stackoverflow.com/a/34536511/20126 – Amr Elgarhy Dec 30 '15 at 20:08
2 Answers
0
Use this:
<!-- METADATA
comment
-->

AllOutOfSalt
- 1,516
- 3
- 27
- 46
-
1It's also worth noting that normally comments are tied to the scripting language used so if JScript was used multi-line comments are built in `/* */`. By default though Classic ASP uses VBScript which doesn't support multi-line comments. This trick will work for any of the scripting languages because it is handled by the Classic ASP pre-processor but it's worth noting that this will only work for Classic ASP. If you were working with VBScript standalone this will not work. – user692942 Oct 15 '15 at 09:05
-
-
@Paul I'm not condemning the practice just pointing out the flaws. It is indeed a hack though, but a clever one. – user692942 Oct 15 '15 at 09:30
-
1. How is this a hack? 2. If you try to put something like this into your actual vbscript code, i.e. *within* the `<% %>` tags, it'll blow up in your face. Perhaps the answer should make that clear? – Martha Oct 15 '15 at 15:09
0
There is no "multi-line comments" in ASP - my suggestion for a quick dirty fix:
if False then
...
code to be 'commented'
...
end if

Pedro Pimenta
- 1
- 1