More in this section

Forums / General Discussions / Upload master page problem...

Upload master page problem...

3 posts, 0 answered
  1. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    09 Jun 2010
    Link to this post
    Hi,
    I had a web site with MasterPage and I am trying to use that MasterPage by upload to a newly created project Sitefinity. I had a problem that when I uploaded I got an error it Said "Could not load type 'MasterPage'"

    Here is error:

    Server Error in '/CMSSite' 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 'CMS_MasterPage'.

    Source Error:

    Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="CMS_MasterPage.master.cs" Inherits="CMS_MasterPage" %>
    Line 2: 
    Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     

    Source File: /cmssite/App_Master/CMS_MasterPage.Master    Line: 1

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



    Can anyone help?

    Thanks,
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    09 Jun 2010
    Link to this post
    Hi NK,

    The problem is because the CodeBehind file is not built. If you want to use CodeBehind you should first build it into an assembly and then reference it from the master page as you are. This is an old .NET concept. The newer one is to use CodeFile. Works the same way, however is compiled at run time you do not need to build it into your own assembly.

    If you are working with Sitefinity 4.0 as the website is a web application you should always build the project when you make code or markup changes.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. NK
    NK avatar
    82 posts
    Registered:
    15 Apr 2010
    09 Jun 2010
    Link to this post

    It worked.

    Thanks,
3 posts, 0 answered