Putting a comment on an aspx file

Hello:

This should be easy enough. How do I put a comment out some lines on an aspx file (NOT code-behind) file. Also, how can I make it so that the final rendered HTML does not contain this comment?

Thanks!
freezegravityAsked:
Who is Participating?
 
McExpCommented:
Add the <% tag at the start and the %> tag at the end.

Then select the lines to comment out and use VS's commenting functionality or just do it manually by prefixing each line with //

see example below.

<html>
<body>
<%
    //<div>
    //<h1></h1>
    //</div>
%>
</body>
</html>
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
This way

<!-- your comment -->
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
McExp,

// works ? Isn't ' (this look like crazy talk!)

<html>
<body>
<%
    '<div>
    '<h1></h1>
    '</div>
%>
</body>
</html>
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
McExpCommented:
The poster's language is C#, so I was giving my code sample in the corect language!  

// is a valid comments symbol in C#
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Didn't looked for the zone! :-)
0
 
freezegravityAuthor Commented:
THANKS ALL!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.