Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Server-side comments: What's the equivalent of <%-- --%> in ASP Classic?

Tags:

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.

like image 445
Heinzi Avatar asked Dec 13 '10 16:12

Heinzi


People also ask

How do you comment in classic ASP?

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 are server-side comments?

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.

Is ASP classic still used?

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.

What is meant by classic asp?

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.


1 Answers

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.

like image 60
AnthonyWJones Avatar answered Oct 06 '22 22:10

AnthonyWJones