+1-888-365-2779
Try Now
More in this section

Forums / Designing & Styling / codefile doesnt exist

codefile doesnt exist

4 posts, 0 answered
  1. Justin
    Justin avatar
    11 posts
    Registered:
    28 Feb 2011
    01 Mar 2011
    Link to this post
    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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Line 3:  <html xmlns="http://www.w3.org/1999/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!
  2. Michael
    Michael avatar
    7 posts
    Registered:
    07 Dec 2010
    01 Mar 2011
    Link to this post
    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.
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Mar 2011
    Link to this post
    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
  4. Justin
    Justin avatar
    11 posts
    Registered:
    28 Feb 2011
    01 Mar 2011
    Link to this post
    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.
4 posts, 0 answered