commenting aspx code

Discussion in 'ASP .Net Web Controls' started by Vipper, Jul 27, 2007.

  1. Vipper

    Vipper Guest

    Hi,

    This question seems a little silly, but I want to dissable code lines using
    this way:

    <asp:Button ID="Button1" runat="server" Text="Button" /></div>
    <!--<asp:Button ID="Button1" runat="server" Text="ButtonOld"
    /></div>-->

    But I get an error about a duplicate identificator.
    How can I fix it?
     
    Vipper, Jul 27, 2007
    #1
    1. Advertising

  2. Vipper

    Riki Guest

    Vipper wrote:
    > Hi,
    >
    > This question seems a little silly, but I want to dissable code lines
    > using this way:
    >
    > <asp:Button ID="Button1" runat="server" Text="Button" /></div>
    > <!--<asp:Button ID="Button1" runat="server" Text="ButtonOld"
    > /></div>-->
    >
    > But I get an error about a duplicate identificator.
    > How can I fix it?


    Use <%-- --%> tags for commenting out control tags.

    --

    Riki
     
    Riki, Jul 28, 2007
    #2
    1. Advertising

  3. Vipper

    ThunderMusic Guest

    hi,
    actually, there are two problems in your code:
    First, put a space between <!-- and <asp:Button and the same applies for the
    end tag ( -->)
    Second, you've included a </div> that did not start in your comment block

    I hope it helps

    ThunderMusic

    "Vipper" <> wrote in message
    news:...
    > Hi,
    >
    > This question seems a little silly, but I want to dissable code lines
    > using
    > this way:
    >
    > <asp:Button ID="Button1" runat="server" Text="Button" /></div>
    > <!--<asp:Button ID="Button1" runat="server" Text="ButtonOld"
    > /></div>-->
    >
    > But I get an error about a duplicate identificator.
    > How can I fix it?
    >
     
    ThunderMusic, Jul 30, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vijay
    Replies:
    7
    Views:
    13,747
    Jim Lewis
    Feb 7, 2005
  2. =?Utf-8?B?U2FuZHk=?=

    Commenting out VB code

    =?Utf-8?B?U2FuZHk=?=, Feb 2, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    51,854
    =?Utf-8?B?Sm9uWg==?=
    Feb 3, 2005
  3. patrick

    java commenting out of code

    patrick, Jan 11, 2006, in forum: Java
    Replies:
    4
    Views:
    5,221
    Malte Christensen
    Jan 11, 2006
  4. rajeshb

    Commenting C++ code - TIPS

    rajeshb, May 6, 2004, in forum: C++
    Replies:
    7
    Views:
    1,076
    Old Wolf
    May 6, 2004
  5. Michael

    Commenting out debug code

    Michael, May 27, 2004, in forum: C++
    Replies:
    3
    Views:
    471
Loading...

Share This Page