ASP.NET 2.0 Server-side Comments

Ever wonder how to write comments within an aspx file? <!– Some Comment –> won’t cut it as it gets processed on the server side and the resulting HTML will contain the commented code as processed. Enter, <%– –%>. There are 2 ways you can truly comment on an aspx file.

If you prefer to type then use the <%- some comment –%> tags to enclose comments like below,

<%–

Anything within this block will not be parsed/handled by ASP.NET.

<asp:TextBox runat=”server”></asp:TextBox>

–%>

If you prefer to click then here is the visual way of doing the same,

Technorati Tags: ,,
Related Posts with Thumbnails


Subscribe to our free RSS feed to keep up with what's happening at DemoGeek.com

At DemoGeek.com we try to explain the tech stuffs in as much detail as we can to help the not-so-tech-savvy of our friends understand and follow the tech stuffs.

Share/Save/Bookmark

Subscribe to DemoGeek.com
Change default install location in Windows Control startup programs in Windows

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

No comments yet

Leave a Reply





XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

About DemoGeek.com

DemoGeek.com brings you high quality articles, tutorials and how to's on everything related to Microsoft Windows, Mac OSX, iPhone, Useful Websites, Browsers, Software and Programming.

At DemoGeek.com you'll find step-by-step explanation of the technical issues explained in detail with screenshots and screencasts. Read More...

Contact |  FUG |  Disclaimer

Creative Commons License

Canonical URL by SEO No Duplicate WordPress Plugin