codefile doesnt exist

Posted by Community Admin on 05-Aug-2018 01:49

codefile doesnt exist

All Replies

Posted by Community Admin on 01-Mar-2011 00:00

Hey guys - I need a little help. I'm a designer - highly proficient with XHTML & CSS.

I followed the documentation for creating a new master page (http://www.sitefinity.com/documentation/designers-guide/creating-a-template/creating-a-template-using-master-pages.aspx). However, when I get to the part where I create the template I get the following Parse Error:

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: The file '/App_Data/Sitefinity/WebsiteTemplates/HCP/App_Master/MasterPage2.master.cs' does not exist.

Source Error:

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

Obviously the problem is that there is no MasterPage2.master.cs. So why does the documentation say to have that in there if the file doesnt exists? Am I supposed to create it too? There's no further mention of it in the instructions.

Thanks guys!

Posted by Community Admin on 01-Mar-2011 00:00

Hey Justin, it's a mistake in the documentation.  I noticed it too but forgot to submit a bug about it.  Just remove the last two attributes so your first line reads:

<%@ Master Language="C#" %>

and it will work fine.

Posted by Community Admin on 01-Mar-2011 00:00

Hi Michael,

The error is thrown, because the code behind of your master file does not exist - MasterPage2.master.cs or it cannot be found due to a wrong namespace. If you have manually copy-paste this master page, please make sure that the web application has been built. Also I suggest that you should use user controls and custom controls that you drag/drop on the master page or your pages.

Regards,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 01-Mar-2011 00:00

Thanks! That fixed it.

I gotta say, the designer documentation is pretty weak. It's also missing the closing of the ScriptManager call which causes a server error: <asp:ScriptManager ID="ScriptManager1" runat="server" > (should end with />).

Documentation on CSS & JS implementation is also vague. I'm a little disappointed thus far.

This thread is closed