ASP.NET Custom Control - Default Template?
Posted
by Bob Fincheimer
on Stack Overflow
See other posts from Stack Overflow
or by Bob Fincheimer
Published on 2010-06-15T18:28:03Z
Indexed on
2010/06/15
23:22 UTC
Read the original article
Hit count: 207
I know this is really picky, but can I have one template inside a user control:
<uc:MyUserControl runat="server" ID="test">
<div><b>Test</b></div>
<asp:PlaceHolder runat="server" id="pH" />
</uc:MyUserControl>
Instead of what I have now which requires me to:
<uc:MyUserControl runat="server" ID="test">
<Content>
<div><b>Test</b></div>
<asp:PlaceHolder runat="server" id="pH" />
</Content>
</uc:MyUserControl>
Basically I want my control to have only one ITemplate inside of it.
© Stack Overflow or respective owner