Add comments

Discussion in 'ASP .Net' started by Andre, Jul 14, 2004.

  1. Andre

    Andre Guest

    Hi,

    If i have some code like this...

    <asp:table>
    <asp:tablerow>
    <asp:tablecell>
    <asp:tablerow>
    <asp:tablerow>
    <asp:tablecell>
    <asp:tablerow>
    <asp:table>

    What can i do to put one table row in comments, so the code will not
    show up when i run the page, just like <!-- --> in ASP. Because <!-- -->
    give an error : Literal content ('<!--') is not allowed within a
    'System.Web.UI.WebControls.TableRowCollection'.

    When i want to do some test i don't want to erase code eache time i make
    a test.

    <!--
    <asp:tablerow>
    <asp:tablecell>
    <asp:tablerow>
    -->


    Thank you.
    Andre, Jul 14, 2004
    #1
    1. Advertising

  2. Andre

    Curt_C [MVP] Guest

    didnt' test but try
    <!--
    //-->

    instead of
    <!--
    -->


    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "Andre" <> wrote in message
    news:...
    > Hi,
    >
    > If i have some code like this...
    >
    > <asp:table>
    > <asp:tablerow>
    > <asp:tablecell>
    > <asp:tablerow>
    > <asp:tablerow>
    > <asp:tablecell>
    > <asp:tablerow>
    > <asp:table>
    >
    > What can i do to put one table row in comments, so the code will not
    > show up when i run the page, just like <!-- --> in ASP. Because <!-- -->
    > give an error : Literal content ('<!--') is not allowed within a
    > 'System.Web.UI.WebControls.TableRowCollection'.
    >
    > When i want to do some test i don't want to erase code eache time i

    make
    > a test.
    >
    > <!--
    > <asp:tablerow>
    > <asp:tablecell>
    > <asp:tablerow>
    > -->
    >
    >
    > Thank you.
    >
    >
    Curt_C [MVP], Jul 14, 2004
    #2
    1. Advertising

  3. Andre

    Kyril Magnos Guest

    You need to use the ASP.NET comment delimiter.

    <%--
    <asp:TableRow>
    <asp:TableCell />
    </asp:TableRow>
    --%>

    HTH,

    Kyril

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > didnt' test but try
    > <!--
    > //-->
    >
    > instead of
    > <!--
    > -->
    >
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > Site: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "Andre" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> If i have some code like this...
    >>
    >> <asp:table>
    >> <asp:tablerow>
    >> <asp:tablecell>
    >> <asp:tablerow>
    >> <asp:tablerow>
    >> <asp:tablecell>
    >> <asp:tablerow>
    >> <asp:table>
    >>
    >> What can i do to put one table row in comments, so the code will not
    >> show up when i run the page, just like <!-- --> in ASP. Because <!-- -->
    >> give an error : Literal content ('<!--') is not allowed within a
    >> 'System.Web.UI.WebControls.TableRowCollection'.
    >>
    >> When i want to do some test i don't want to erase code eache time i

    > make
    >> a test.
    >>
    >> <!--
    >> <asp:tablerow>
    >> <asp:tablecell>
    >> <asp:tablerow>
    >> -->
    >>
    >>
    >> Thank you.
    >>
    >>

    >
    >
    Kyril Magnos, Jul 14, 2004
    #3
  4. Andre

    Andre Guest

    Tnx, that's perfect.


    "Kyril Magnos" <> wrote in message
    news:%...
    > You need to use the ASP.NET comment delimiter.
    >
    > <%--
    > <asp:TableRow>
    > <asp:TableCell />
    > </asp:TableRow>
    > --%>
    >
    > HTH,
    >
    > Kyril
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:...
    > > didnt' test but try
    > > <!--
    > > //-->
    > >
    > > instead of
    > > <!--
    > > -->
    > >
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > Site: http://www.Darkfalz.com
    > > Blog: http://blog.Darkfalz.com
    > >
    > >
    > > "Andre" <> wrote in message
    > > news:...
    > >> Hi,
    > >>
    > >> If i have some code like this...
    > >>
    > >> <asp:table>
    > >> <asp:tablerow>
    > >> <asp:tablecell>
    > >> <asp:tablerow>
    > >> <asp:tablerow>
    > >> <asp:tablecell>
    > >> <asp:tablerow>
    > >> <asp:table>
    > >>
    > >> What can i do to put one table row in comments, so the code will

    not
    > >> show up when i run the page, just like <!-- --> in ASP. Because

    <!-- -->
    > >> give an error : Literal content ('<!--') is not allowed within a
    > >> 'System.Web.UI.WebControls.TableRowCollection'.
    > >>
    > >> When i want to do some test i don't want to erase code eache time i

    > > make
    > >> a test.
    > >>
    > >> <!--
    > >> <asp:tablerow>
    > >> <asp:tablecell>
    > >> <asp:tablerow>
    > >> -->
    > >>
    > >>
    > >> Thank you.
    > >>
    > >>

    > >
    > >

    >
    >
    Andre, Jul 14, 2004
    #4
    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. Erik van Duijn
    Replies:
    0
    Views:
    426
    Erik van Duijn
    May 9, 2004
  2. Eric
    Replies:
    1
    Views:
    769
    Jim Higson
    Nov 14, 2005
  3. Replies:
    0
    Views:
    1,094
  4. Monk
    Replies:
    10
    Views:
    1,434
    Michael Wojcik
    Apr 20, 2005
  5. Replies:
    4
    Views:
    573
    Dr John Stockton
    Jun 3, 2006
Loading...

Share This Page