Error: Content is not allowed between the opening and closing tags for element

Discussion in 'ASP .Net' started by Allan Ebdrup, Jan 26, 2006.

  1. Allan Ebdrup

    Allan Ebdrup Guest

    I have a ascx webcontrol that I register with:
    %@ Register Src="../Controls/Default/Library/Basket/Basket.ascx"
    TagName="Basket"
    TagPrefix="uc1" %>

    and instantiate on the page with:
    <uc1:Basket ID="Basket1" runat="server" />

    This works without problems, Now I've added the attribute:
    [ParseChildren(ChildrenAsProperties = true)]
    to the basket control and added a property called Header of the type
    ITemplate.
    When I change my basket tag to look like:
    <uc1:Basket ID="Basket1" runat="server">
    <Header>Myheader</Header>
    </uc1:Basket>

    I get the following error on the Basket tag:
    Error 1 Cannot switch views: Content is not allowed between the opening and
    closing tags for element 'Basket'.

    And the following error on the Header tag:
    Error 2 Validation (XHTML 1.0 Transitional): Element 'header' is not
    supported.


    When I run the page it works fine.

    What am I missing to allow tags inside the Basket controls XML?

    Kind Regards,
    Allan Ebdrup
     
    Allan Ebdrup, Jan 26, 2006
    #1
    1. Advertisements

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. Pradeep
    Replies:
    8
    Views:
    819
    Oliver Wong
    Apr 18, 2006
  2. hazz
    Replies:
    6
    Views:
    51,828
    SkyUCHC
    Jun 9, 2010
  3. Donald Firesmith

    html tags within meta tags allowed?

    Donald Firesmith, Jan 5, 2005, in forum: XML
    Replies:
    5
    Views:
    1,205
    Andy Dingley
    Jan 8, 2005
  4. Replies:
    2
    Views:
    1,093
  5. Saravan Wants
    Replies:
    3
    Views:
    4,582
    Peter Flynn
    Sep 30, 2010
  6. Dave

    "Text is not allowed between the opening and closing tag"?

    Dave, Sep 8, 2006, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    299
  7. Allan Ebdrup
    Replies:
    0
    Views:
    459
    Allan Ebdrup
    Jan 20, 2006
  8. Iñaki Baz Castillo
    Replies:
    13
    Views:
    746
    Iñaki Baz Castillo
    May 1, 2011
Loading...