Placing Comments in Aspx Pages

Discussion in 'ASP .Net' started by Joey, Sep 17, 2007.

  1. Joey

    Joey Guest

    How do I place comments in aspx pages that are subscribed to master
    pages?

    This is going to be necessary as all source code pages must have
    copyrights/author information etc...

    When I attempt to do this with HTML comment tags i.e. <!-- my comments
    -->, it doesn't work. The compiler throws errors: "Only Content
    controls are allowed directly in a content page that contains Content
    controls."

    Surely there has to be a way to do this.....?

    TIA
    Joey, Sep 17, 2007
    #1
    1. Advertising

  2. "Joey" <> wrote in message
    news:...

    > Surely there has to be a way to do this.....?


    <asp:Content ID="cphContent" ContentPlaceHolderID="cphContent"
    runat="server">
    <!--
    comments
    -->
    </asp:Content>


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Sep 17, 2007
    #2
    1. Advertising

  3. Joey

    Joey Guest

    On Sep 17, 12:21 pm, "Mark Rae [MVP]" <> wrote:
    > "Joey" <> wrote in message
    >
    > news:...
    >
    > > Surely there has to be a way to do this.....?

    >
    > <asp:Content ID="cphContent" ContentPlaceHolderID="cphContent"
    > runat="server">
    > <!--
    > comments
    > -->
    > </asp:Content>
    >
    > --
    > Mark Rae
    > ASP.NET MVPhttp://www.markrae.net


    Yes I know. Sorry I guess I should have been a little more clear...the
    comments need to be at the TOP of the page, before the opening Content
    tag.
    Joey, Sep 17, 2007
    #3
  4. "Joey" <> wrote in message
    news:...

    > Yes I know. Sorry I guess I should have been a little more clear...the
    > comments need to be at the TOP of the page, before the opening Content
    > tag.


    ??? Why?


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Sep 17, 2007
    #4
  5. Sounds like you need to be updating the master with the information you need
    from within your content pages contentplaceholders, rather than thinking
    about this from a content perspective. Take a look at the conmtent to
    master page interaction example by Scott Allan at
    http://www.odetocode.com/Articles/450.aspx

    Regards

    John Timney (MVP)
    http://www.johntimney.com
    http://www.johntimney.com/blog


    "Joey" <> wrote in message
    news:...
    > On Sep 17, 12:21 pm, "Mark Rae [MVP]" <> wrote:
    >> "Joey" <> wrote in message
    >>
    >> news:...
    >>
    >> > Surely there has to be a way to do this.....?

    >>
    >> <asp:Content ID="cphContent" ContentPlaceHolderID="cphContent"
    >> runat="server">
    >> <!--
    >> comments
    >> -->
    >> </asp:Content>
    >>
    >> --
    >> Mark Rae
    >> ASP.NET MVPhttp://www.markrae.net

    >
    > Yes I know. Sorry I guess I should have been a little more clear...the
    > comments need to be at the TOP of the page, before the opening Content
    > tag.
    >
    John Timney \(MVP\), Sep 17, 2007
    #5
  6. Joey

    Joey Guest

    On Sep 17, 4:14 pm, "Mark Rae [MVP]" <> wrote:
    > "Joey" <> wrote in message
    >
    > news:...
    >
    > > Yes I know. Sorry I guess I should have been a little more clear...the
    > > comments need to be at the TOP of the page, before the opening Content
    > > tag.

    >
    > ??? Why?
    >
    > --
    > Mark Rae
    > ASP.NET MVPhttp://www.markrae.net


    If each page is marked with copyright/author info at the top, it's
    easier to identify. That just makes good sense to me. In my opinioni
    Microsoft should allow for programmers to comment at the top of each
    page of code, as this is something many people prefer to do. Oh well,
    it's not a catastrophe. Thanks guys.
    Joey, Sep 18, 2007
    #6
    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. Shahzad Godil
    Replies:
    2
    Views:
    727
    Shahzad Godil
    Aug 31, 2005
  2. mf_sina

    Placing webwiz ASP-made site components in ASP pages

    mf_sina, Feb 13, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    211
    mf_sina
    Feb 13, 2005
  3. Shahzad Godil

    Placing ActivexControl in Windows control in aspx page

    Shahzad Godil, Aug 30, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    149
    Shahzad Godil
    Aug 31, 2005
  4. mf_sina

    Placing webwiz ASP-made site components in ASP pages

    mf_sina, Feb 13, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    140
    mf_sina
    Feb 13, 2005
  5. RadioSignal

    passing variables from .aspx.cs code pages to .aspx pages

    RadioSignal, Sep 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    2,188
    Mirronelli
    Oct 22, 2005
Loading...

Share This Page