I am learning sharepoint designer, and one of the things i have been trying to do today is to create a custom page! I want to use an existing master page to create it, but every time I Attach the Master page the whole file changes to this:

<%@ Page Language="C#" masterpagefile="~masterurl/default.master" title="Untitled 1" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>

<%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Then I am lost, for example, how can i add a div or a webpart to the page??

3 Answers 3


is that all you have? For example, a random page of my app looks like this:

    <%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
    <%--<SharePoint:ScriptLink name="sp.js" runat="server" OnDemand="true" LoadAfterUI="true" Localizable="false" />--%>
    <script type="text/javascript" src="../Scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="../_layouts/15/sp.js"></script>
    <link rel="Stylesheet" type="text/css" href="../Content/App.css" />

    <script type="text/javascript" src="../Scripts/scriptconfigpage.js"></script>

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
    <WebPartPages:WebPartZone runat="server" FrameType="Default" ID="full" Title="loc:full" />
    <h2>HeaderText</h2><br />
    <button type="button" onclick="jsGoToPermissionPage2(); return false;">App Permission</button>
    <br />


When you place HTML in the PlaceHolderMain for example then this content appears in the body of the page.

  • After I create my aspx page and attach the master page, all there is left is these two lines above. Everything else is gone....... Commented Apr 22, 2015 at 6:47

After you create the content page, you can locate the content placeholder to which you want to add custom content. The Master Page toolbar makes it easier to locate the content placeholders.

  • On the View menu, click Toolbars, and then click Master Page.
  • On the Master Page toolbar, click the arrow next to the Regions box, and then click the placeholder to which you want to add custom content.
  • After you locate the content placeholder, you can add custom content to it.
  • Click the content placeholder, click the arrow Button image in the upper-right corner to show the Common Content Tasks list, and then click Create Custom Content.
  • For example, if you are adding content to PlaceHolderMain, the main content region for the new content page is now editable. Note the word (Custom) (in parentheses) on the content placeholder tab. This lets you know that the content is custom content for this page only, and that it is not retrieved from the attached master page.
  • The content region becomes editable, as can be seen by the text (Custom) beside the content placeholder.

You can now add custom content to the page. You can, for example, add custom views, forms, Web Parts, and Web Part Zones.

  • On the View menu, there are no Toolbars, only Task Panes.. Commented Apr 22, 2015 at 6:56

if you convert your own Html Page to Master Page then the default ribbon hide and you lost on your page. then go to that URL to change the master page


Please visit this URL, it may help you lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.