New User Control -Could not load type

Vote:
 

Following http://world.episerver.com/en/Get-Started/Developing-with-EPiServer-CMS/Getting-Started-Developing-with-EPiServer-CMS-5/Getting-Started-Sub-Menu/

 I have created a SubMenu, however I am getting the error below

 

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

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'EPiServer.Templates.RelatePlus.UserControls.SubMenu'.

Source Error:


Line 1: <%@ Control Language="C#" AutoEventWireup="false" CodeBehind="SubMenu.ascx.cs" Inherits="EPiServer.Templates.RelatePlus.UserControls.SubMenu" %>
Line 2:
Line 3:

Source File: /Templates/RelatePlus/UserControls/SubMenu.ascx Line: 1


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

#30006
May 27, 2009 3:57
Vote:
 
It looks like your assembly does not contain your newly created class. Did you rebuild the project?
#30014
May 27, 2009 7:41
Vote:
 

Hi Saar,

I would first of all check the namespace of your class SubMenu.cs, the namespace you be EPiServer.Templates.RelatePlus.UserControls and then make sure you have compiled the project.

Best regards,
Tom

#30038
May 27, 2009 20:01
Vote:
 

I think the namespace is ok, the build was good too

SubMenu.ascx
<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="SubMenu.ascx.cs" Inherits="EPiServer.Templates.RelatePlus.UserControls.SubMenu" %>

SubMenu.ascx.cs
namespace EPiServer.Templates.RelatePlus.UserControls

#30043
May 27, 2009 21:21
Vote:
 

Hi Saar,

It's seems like you were using the wrong type of project; Web Site instead of Web Application. Hopefully it will do the trick to change this!

//Tom

#30094
Jun 01, 2009 16:23
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.