Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comment Syntax for tags not working?

Status
Not open for further replies.

bjdobs

Programmer
Mar 11, 2002
261
CA
', //, and /* */ comment syntax not working for asp tags

' <asp: ...
// <asp: ...
/* <asp: ... ... */

Is there another method to turn off code other then deleting it?

 
First of all, in the html of an asp.net page, you just use standard html comments -
Code:
<!--    
don't show this
-->

which will cause html content not to be displayed. BUT, even if server tags are commented out, they still are executed. If you don't want one displayed, just set it's Visible property to false.
Code:
<asp:label runat="server" visible="false">text</asp:label>

VB comments ' and C# comments // and /* */ cause the compiler to ignore the code, but only in the code of a page.


Greetings,
Dragonwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top