This website may use cookies. More info. That's Fine x
Welcome Login

Visual studio: Adding a comment to an aspx file


Visual Studio

You can add a comment to an aspx page using following syntax:

<%-- This is a Comment --%>

Keyboard:

Just highlight the text you want to comment and them do Ctrl-K and Ctrl-C and everything you highlighted will between <%-- and ---%>

<%-- This is a Comment -

hello world -%>


Or using the following Visual Studio shortcuts (comment and uncomment selection):


commenting aspx


 

Keyboard shortcuts:

To add comment:

select line(s)

ctrl k, then ctr c (chord is a combination of keyboards)

To uncomment:

ctrl k, then ctr u


Created on: Wednesday, March 2, 2011 by Andrew Sin