Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
0 Points
7 Posts
Feb 15, 2008 02:44 PM|LINK
Sorry Jesse,
I don't think my original post was very clear. I have gone in a slightly different direction. Same basic idea, but using Templates inside a user control.
I am looking for something like this
http://wss3.theseders.com/robsederblog/Lists/Posts/Post.aspx?List=4c9e886c%2D4b5c%2D4a3e%2D95a0%2De30b3f4a1e9c&ID=67
But I am getting an error on this that says "Type 'System.Web.UserControl' does not have a public property named 'ContentTemplate'
However I do have :)
[In the User Control]
private ITemplate _windowContent;
protected override void OnInit(EventArgs e) { base.OnInit(e); if (_windowContent != null) { _windowContent.InstantiateIn(webWindowContent); } }
[PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(typeof(TemplateControl))] public ITemplate ContentTemplate { get { return _windowContent; } set { _windowContent = value; } }
achuzan
0 Points
7 Posts
Re: Adding Controls to a custom user control
Feb 15, 2008 02:44 PM|LINK
Sorry Jesse,
I don't think my original post was very clear. I have gone in a slightly different direction. Same basic idea, but using Templates inside a user control.
I am looking for something like this
http://wss3.theseders.com/robsederblog/Lists/Posts/Post.aspx?List=4c9e886c%2D4b5c%2D4a3e%2D95a0%2De30b3f4a1e9c&ID=67
But I am getting an error on this that says "Type 'System.Web.UserControl' does not have a public property named 'ContentTemplate'
However I do have :)
[In the User Control]
private ITemplate _windowContent;
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (_windowContent != null)
{
_windowContent.InstantiateIn(webWindowContent);
}
}
[PersistenceMode(PersistenceMode.InnerProperty),
TemplateContainer(typeof(TemplateControl))]
public ITemplate ContentTemplate
{
get { return _windowContent; }
set { _windowContent = value; }
}