Upload master page problem...

Posted by Community Admin on 03-Aug-2018 14:24

Upload master page problem...

All Replies

Posted by Community Admin on 09-Jun-2010 00:00

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,

Posted by Community Admin on 09-Jun-2010 00:00

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.

Posted by Community Admin on 09-Jun-2010 00:00


It worked.

Thanks,

This thread is closed