ASPX templates
Version 4.x > ASPX templates > ASPX templates must inherit from TemplatePage and TemplateMasterPage? View modes: 
User avatar
Member
Member
random0xff - 5/31/2009 10:12:33 AM
   
ASPX templates must inherit from TemplatePage and TemplateMasterPage?
I was reading this:

http://devnet.kentico.com/Blogs/Martin-Hejtmanek/April-2009/ASPX-versus-Portal-Engine-developement-in-Kentico-.aspx

"The only thing you need to ensure is that it inherits specific class from the CMS.UIControls namespace, which is TemplatePage for .aspx pages and TemplateMasterPage for master pages. "

I have some templates that are working fine but I did not inherit from these classes. Is that a problem? What exactly is going to happen when I inherit from them?

User avatar
Kentico Developer
Kentico Developer
kentico_zbysekn - 6/1/2009 7:37:48 AM
   
RE:ASPX templates must inherit from TemplatePage and TemplateMasterPage?
Hi,
It also depends on version you are using in older version there wasn't so strong checking, so you can work with templates inheriting from System.Web.UI.Page.
But we strongly recommend to inherit from mentioned class because they define some methods essential for CMS and you will avoid further problems.
Best Regards,
Zbysek Nemec.

User avatar
Member
Member
random0xff - 6/11/2009 4:19:13 PM
   
RE:ASPX templates must inherit from TemplatePage and TemplateMasterPage?
Can you tell me the problems I can expect if I do not inherit from them?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/12/2009 12:59:22 AM
   
RE:ASPX templates must inherit from TemplatePage and TemplateMasterPage?
Hi,

The CMS controls and web parts may not work and also the page may not be available in CMS Desk interface.


Best Regards,
Juraj Ondrus