RSS 2.0 Feed
RSS 2.0


Atom 1.0 Feed
Atom 1.0

  Commenting out ASP.NET Server Controls 


qt8gt0bxhw|20009F4EEE83|RyanMain|subtext_Content|Text|0xfbfff40000000000e000000001000800

I guess I don't need to do this frequent enough to remember this because I always seem to forget. To comment out a server control from your aspx page you cannot use <!-- and -->. Obviously, this is a server control, so you use server side comments:

<%-- <asp:Button runat=server id=button1></asp:Button> --%>




                   



Leave a comment below.

Comments

  1. Joe Gakenheimer 8/16/2005 5:00 AM
    Gravatar
    Same here, I forget how to do it, yet you guys were the only place on the net that I found with this info.
  2. Gray Raven 3/29/2006 9:10 AM
    Gravatar

    I'm curious, though. What if it's a complex control that has DataBinder.Eval statements in it (which use the '<%' syntax )??
  3. Aron 7/13/2006 7:34 AM
    Gravatar
    The %> does actually stop the comment. You can put a space between the % and the > and that makes it not notice the tag, but that is sorta a bummer. I think it should just keep on trucking till it sees --%> not just "%>".
    I guess "you can't always get what you want."
  4. Adam 12/6/2006 4:59 PM
    Gravatar
    Thanks for putting this up on the net. Chalk up another "duh" moment for me. Found you via Google.
  5. Anonamouse 7/15/2010 6:10 AM
    Gravatar
    i cant believe i forgot that ;)
  6. cihip 7/17/2010 10:12 PM
    Gravatar
    Commenting out ASP.NET Server Controls thanx ;)
Comments have been closed on this topic.



 

News


Also see my CRM Developer blog

Connect:   @ryanfarley@mastodon.social

         

Sponsor

Sections