November Happy Hour will be moved to Thursday December 5th.

startpage does not extend "System.web.ui.Page

Vote:
 

Hi,

I've just started using Episerver Composer and try to create a startpage with pagetypebuilder based on

the sample made by Ted Nyberg (http://tedgustaf.com/en/blog/2011/9/create-episerver-composer-page-type-with-page-type-builder/)

I'm pretty sure that I've copied the sample exactly how it is presented on Ted's page, but I get an error saying that 

'....Start' is not allowed here because it does not extend class 'System.Web.UI.Page'.

I used Resharper to explore what ExtensionBaseTemplate inherited, but couldn't find System.Web.Ui.Page anywhere.

Anyone know why the startpage doesn't inherit System.web.UI.Page?

 

PTB - startpage    (pagetype)

 

[PageType("C922E5CD-3C58-4920-BE6F-29CCC23A8E66",
Name = "[Skedsmo] Composer StartPage",
Description = "Start page: Dynamic page template with a heavy customizable layout",
Filename = "/Templates/Skedsmo.Internett2/Composer/Pages/Start.aspx")]
public class StartPage : ComposerPageBase
{
[PageTypeProperty(
DisplayInEditMode = false,
UniqueValuePerLanguage = true,
Searchable = true,
Type = typeof(ExtensionContentAreaProperty),
Tab = typeof(ComposerTab))]
public virtual string MainArea { get; set; }

 


}

 

public partial class Start : ExtensionBaseTemplate
{
protected override void OnLoad(System.EventArgs e)
{

  base.OnLoad(e);

}

#60420
Aug 08, 2012 10:15
Vote:
 

ExtensionBaseTemplate inherits TemplatePage which inturn inherits System.web.UI.Page

ExtensionBaseTemplate --> TemplatePage --> EditPage --> SimplePage --> Page (I think that is the order)

#60422
Aug 08, 2012 11:26
Vote:
 

Are you sure you are referenceing to the correct ExtensionBaseTemplate? Try to inherit directly from Dropit.Extension.Core.ExtensionBaseTemplate and see if that helps.

#60425
Aug 08, 2012 11:44
Vote:
 

Minesh Shah: Yes, according to my project you are almost right. SimplePage inherits from PageBase which inherits from Page.

But Page inherits from TemplateControl which inherits from Control which inherits from IComponent, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor which is a bunch of interfaces...

Erik Nordin: On the top of my page I have "using Dropit.Extension.Core;". When I traced class parents a popup showed "loading Dropit.Extesion.pab"

 

ERROR:

'..............Composer.Pages.Start' is not allowed here because it does not extend class 'System.Web.UI.Page'.

#60426
Edited, Aug 08, 2012 12:27
Vote:
 
#60427
Aug 08, 2012 12:28
Vote:
 

I created a new project which solved the problem, but I didn't find any solution why it happened.

And my mistake - Minesh Shah is of cause righ. In frustration I thought that ExtensionBaseTemplate didn't inherit from System.Web.UI.Page. My mistake was that I thought Page was in another namespace. I didn't see that the using System.Web.UI on the top.

#60722
Aug 22, 2012 11:32
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.