I have followed this article on MSDN.
The template works fine but i got 2 big problems.
I can't access the controls in the template even if i decorate the template with these
[TemplateContainer(typeof(MessageContainer))]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
Second, I get a design time error which is really bad:
Error Creating Control - TemplateTest1
Type 'System.Web.UI.UserControl' does not have a public property named 'MessageTemplate'.
Now, why I want this is because user controls are great and easy, so i want to create user control that will produce this
<div class="FormFiled">
--- here i want the ability to put controls that i want ----
<div class="Wrapper">
</div>
</div>
So if templating does not work, is there way to achieve this other than templating ?
Thanks in advance.