I am trying to create SharePoint 2013 AutoHosted App
. In that I have a Default.aspx
page. I want this page to be a Master Page child. Or something like that.
I create a SharePoint Hosted App
and copy the content that were written on the page. and then Added to my Default.aspx
page which were necessary.
I have added bellow line to my page.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AccordionDisplayAppWeb.Pages.Default" MasterPageFile="~masterurl/default.master" %>
I mean I just add MasterPageFile
attribute in that.
But it is giving me error like follows.
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: The file '/Pages/~masterurl/default.master' does not exist.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AccordionDisplayAppWeb.Pages.Default" MasterPageFile="~masterurl/default.master" %>
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: /Pages/Default.aspx Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
But it is not working.
Can anyone help me to solve this.