F
Fredrik Elestedt
Hi,
I'm having problems with renaming a form when using templates.
The template type I'm using can be found here:
http://www.charon.co.uk/content.aspx?CategoryID=28&ArticleID=42
http://www.charon.co.uk/content.aspx?CategoryID=28&ArticleID=43
To summarize the articles...
I'm overriding the AddParsedSubObject() method to load a template
usercontrol, code as follows:
protected override void AddParsedSubObject(System.Object Control) {
if (pageTemplate == null)
LoadTemplate();
}
protected void LoadTemplate() {
pageTemplate =
(page_template)Page.LoadControl("/templates/page_template.ascx");
}
And in OnInit i call
base.AddParsedSubObject(pageTemplate);
This means that page_template.ascx will be displayed instead of the current
page unless I add more controls to the page (which is done but I don't see
that that is relevant in this case).
My problem is that whatever I set the ID tag in the template to (or any
other page for that matter), it always renders to __aspnetForm
Any ideas on a solusion is appriciated.
// Fredrik
I'm having problems with renaming a form when using templates.
The template type I'm using can be found here:
http://www.charon.co.uk/content.aspx?CategoryID=28&ArticleID=42
http://www.charon.co.uk/content.aspx?CategoryID=28&ArticleID=43
To summarize the articles...
I'm overriding the AddParsedSubObject() method to load a template
usercontrol, code as follows:
protected override void AddParsedSubObject(System.Object Control) {
if (pageTemplate == null)
LoadTemplate();
}
protected void LoadTemplate() {
pageTemplate =
(page_template)Page.LoadControl("/templates/page_template.ascx");
}
And in OnInit i call
base.AddParsedSubObject(pageTemplate);
This means that page_template.ascx will be displayed instead of the current
page unless I add more controls to the page (which is done but I don't see
that that is relevant in this case).
My problem is that whatever I set the ID tag in the template to (or any
other page for that matter), it always renders to __aspnetForm
Any ideas on a solusion is appriciated.
// Fredrik