cant see the HTML added to Templated Control in design mode

P

Peter Vasko

Hi everybody,

I have a web control that has its own designer implemented....everything
works fine, I get the proper values that are stored in the container but I
would like to go even further and its where the problem appears.

Why do I get a grey box when I open my page containing the control in the
designer. Why can't I see the text that is between <MyTemplate> tags?

If I do the same thing in DataList I can see the text in bold and italics
with the word "Databound" next to it...what am I missing in my web templeted
control designer?.
<ctrl:MyControl id="myCtrl" runat="server"> <MyTemplate>
<b>Title</b><%# Container.Title %><br> <i>Price</i><%#
Container.TotalPostCount %> </MyTemplate></ctrl:DisplayStats>any help
appreciated..thx
 
P

Peter Vasko

<ctrl:MyControl id="myCtrl" runat="server">
<MyTemplate>
<b>Title</b><%# Container.Title %><br>
<i>Price</i><%# Container.TotalPostCount %>
</MyTemplate>
</ctrl:DisplayStats>
 
J

Jos Branders

Peter said:
<ctrl:MyControl id="myCtrl" runat="server">
<MyTemplate>
<b>Title</b><%# Container.Title %><br>
<i>Price</i><%# Container.TotalPostCount %>
</MyTemplate>
</ctrl:DisplayStats>

Here's a class that you can derive from for a templated control designer:
http://weblogs.asp.net/asmith/articles/SimpleTemplatedControlDesigner.aspx

You can also have a look at the source code of my Schedule control, which is
a templated control:
http://www.rekenwonder.com/aspnet/schedule.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top