| |||||
Server-Side CommentsASP.NET Syntax ASP.NET Page Syntax Allows you to include code comments in the body of an .aspx file. Any content between opening and closing tags of server-side comment elements, whether ASP.NET code or literal text, will not be processed on the server or rendered to the resulting page. <%-- commented out code or content --%> RemarksASP.NET server-side comment blocks have the same uses as traditional language-specific comment blocks, including documentation and testing. Within <script runat="server"></script> and <% %> blocks, you can use comment syntax in the language that you are coding in. A compilation error will occur if you use server-side comment blocks within <% %> blocks. The opening and closing comment tags can appear on the same line of code or can be separated by many commented-out lines. Server-side comment blocks cannot be nested. Syntax ExampleThe below code snippet demonstrates an HtmlButton control that is commented out. <%-- <button runat="server" id="MyButton" onServerClick = "MyButton_Click">
Click here for enlightenment!
</button>
--%>
See Also |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme