What's the equivalent of <%-- --%>
in ASP Classic?
I have to modify a legacy ASP application and I'd like to comment out a block of HTML:
<td>
some table cell I'd like to comment out, including
some <%= inlineServerSideVBScriptExpressions() %>
</td>
Wrapping everything in <%-- ... --%>
, as I'd do in ASP.NET, doesn't work and results in the compilation error "Expected statement". HTML comments <!-- ... -->
are not an option either, since the inline ASP expressions would get evaluated and fail.
CommentsEdit Active Server Pages uses the quote character (') to define comments. This comment is a "line comment" meaning that it will comment out everything following it up until the end of the line. There is no multi line comment in ASP. In order to comment multiple lines, each line must be preceded by a quote (').
What is Server Side Comments? In ASP.NET MVC supports a server-side comment which make code/content completely disable in the page. ASP.NET Web Forms supports a server-side comment that you can use to completely disable content/code within a page.
It used scripting on the server to create content that would then be sent to a client's web browser, and it enjoyed a tremendous amount of success in its time as a result. Classic ASP, however, is no longer being developed by Microsoft at all - it has long since been replaced by ASP.NET in 2002, a newer alternative.
Classic ASP is a server-side scripting environment that you can use to create and run dynamic web applications. With ASP, you can combine HTML pages, script commands, and COM components to create interactive web pages that are easy to develop and modify.
Try this:-
<!-- METADATA
Your comments here
-->
The METADATA
indicates to the ASP processor that this is a comment that does not need to be sent to the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With