devxlogo

Illegal to Include a Comment in an Output Expression in an ASP Environment

Illegal to Include a Comment in an Output Expression in an ASP Environment

You cannot include a comment in an output expression while working with server side scripts. For example, the first line that follows will work, but the second line will not, because it begins with <%=. It is advisable to separate the comments if such a need arise:
<% x= x +1 'this increments x. This script will not fail. %>
<%= arReturnValue 'this prints the variable varReturnValue. This script will fail. %>

However, if you break the second line so that comment and the output expression is separated, then there is no error.
‘This prints the variable varReturnValue. This script will not fail.
<%= varReturnValue %>

See also  How College Students Can Shape the Future of Tech Responsibility
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist