Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Error: Content is not allowed between the opening and closing tags for element

Reply
Thread Tools

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

 
 
Allan Ebdrup
Guest
Posts: n/a
 
      01-26-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
content is not allowed between the opening and closing tags steve@thepinksofa.com ASP .Net 2 04-15-2007 12:39 AM
"Text is not allowed between the opening and closing tag"? Dave ASP .Net Building Controls 1 09-08-2006 07:01 PM
Error: Content is not allowed between the opening and closing tags for element Allan Ebdrup ASP .Net Web Controls 0 01-20-2006 09:01 AM
html tags within meta tags allowed? Donald Firesmith XML 5 01-08-2005 11:29 PM



Advertisments