ASPX templates
Version 4.x > ASPX templates > The type or namespace name 'TemplatePage' could not be found. View modes: 
User avatar
Member
Member
david-elementcode - 4/23/2009 11:56:49 AM
   
The type or namespace name 'TemplatePage' could not be found.
Hello,

I'm a newbie, so please go easy on me.

I added the KCMS controls to VS 2008 and followed the exact instructions for "Creating a new ASPX page template" within the Developer's Guide 4.0. But when I try to view the new About Us page within CMS Desk, I encounter the following error:


Server Error in '/' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'TemplatePage' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 12: using System.Xml.Linq;
Line 13:
Line 14: public partial class CMSTemplates_CorporateSiteASPX_twocolumntemplate : TemplatePage
Line 15: {
Line 16: protected void Page_Load(object sender, EventArgs e)

Source File: c:\IISProjects\Kentico\4.0\CMSTemplates\CorporateSiteASPX\twocolumntemplate.aspx.cs Line: 14


Can you help?

User avatar
Member
Member
david-elementcode - 4/23/2009 11:59:34 AM
   
RE:The type or namespace name 'TemplatePage' could not be found.
I see now. I was missing the following line in my code behind page:

using CMS.UIControls;