2

I know asp .net but new at sharepoint.But i still setup sharepoint farm solution at azure it is working now i want to developer a site i am strting it with emptySP Project at .Net.

step1: i take one ApplicationPage say(ApplicationPage1) step2: Make registration form at inside place holder main. step3 :run

All thing is working but it's still look like sharepoint page not my page. I want to remove the master page of share point and want to runt a basic aspx page like we use in .net . So,plese tell me if there is any solution.

ContentPlaceholder's are also not work,like if i use site Name and set it's value to "MySite", but it still show SHAREPOINT. i paste Image.enter image description here

1 Answer 1

2

You have two options to do that

  • Create a blank custom master page and attach it to your page.
  • Or just remove DynamicMasterPageFile="~masterurl/default.master" %> from <%@Page tag%>

PageTag

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="yourpage.aspx.cs" Inherits="Something.Layouts.namespace" DynamicMasterPageFile="~masterurl/default.master" %>
  • Now replace all Placeholders tags with normal <HTML>,<Head>,<Body>,<form id="form1" runat="server"> tags as the structure of normal forntcode aspx page.

The application page should look like

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationPage1.aspx.cs" Inherits="EPMCP.Layouts.EPMCP.ApplicationPage1"  %>

    <html><head></head>
    <body>
    <form id="form1" runat="server">
    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
    </form>
    </body>
    </html>

Replace my button with your front code Output

enter image description here

3
  • option of adding master page is not present in it and and after removing this "DynamicMasterPageFile="~masterurl/default.master" ,it bringup a runtime error
    – mehul
    Commented Dec 23, 2016 at 6:01
  • are you removed content place holders after delete DynamicMasterPageFile as i mentioned above and replace it with the mentioned tags Commented Dec 23, 2016 at 6:04
  • i am pretty sure it's should worked, i just tried it again now , just make sure your have removed all content placholders and replace it with html structure like this <html><head></head><body> <form id="form1" runat="server"> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> </form> </body></html> Commented Dec 23, 2016 at 6:10

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.