I am sure this question has been asked and answered; but I could not find it ...
I am creating a very simple custom System.Web.UI.Control that has several properties. I can define the following tag on my aspx page, and all is happy:
<ns:MyControl runat="server" MyProperty="Value" />
However, if I want to have one or more "child" properties, for example:
<ns:MyControl runat="server" MyProperty="Value">
<Element AnotherProperty="AnotherValue1" />
<Element AnotherProperty="AnotherValue2" />
</ns:MyControl>
I cannot figure out what I need to do to check XHTML. I always have
- Content between the end and end tags of the XXX element is not allowed
- 'XXX' is not supported
- Name contains uppercase letters that are not allowed
, , , , . , , , :
[ParseChildren(true)]
[PersistChildren(false)]
public class MyControl : Control
{
public String MyProperty { get; set; }
public String Element { get; set; }
}
, . , , XHTML .
.