locked
Remove master page RRS feed

  • Question

  • User1510859543 posted

    What is the easiest way to remove a master page from an aspx page?

    Friday, April 26, 2019 3:57 PM

Answers

  • User753101303 posted

    Hi,

    Not sure what you mean? You have to bring back in both the code  and markup that you still need to use from this master page.

    You could perhaps consider to have a simplified version of your master page if you have really a problem on doign this or if you master page still brings that much to your content page that is really difficult to change in one go.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 26, 2019 4:41 PM

All replies

  • User753101303 posted

    Hi,

    Not sure what you mean? You have to bring back in both the code  and markup that you still need to use from this master page.

    You could perhaps consider to have a simplified version of your master page if you have really a problem on doign this or if you master page still brings that much to your content page that is really difficult to change in one go.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 26, 2019 4:41 PM
  • User1510859543 posted

    I think I will just make a new master page with the same content names and then copy over the code I need in the new page. That should work, correct?

    Friday, April 26, 2019 5:12 PM
  • User-893317190 posted

    If you want to remove an aspx's master page , you  could copy the content of your aspx  as well as  necessary mark up in your  master page to  your new aspx page.

    If you want to change a master page, you could change  the MasterPageFile property's path to the path of the master page you want to change to 

    <%@ Page Title="" Language="C#" MasterPageFile="~/crossPageDemo/Site2.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebFormCases2.crossPageDemo.WebForm1" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    </asp:Content>

    Best regards,

    Ackerly Xu

    Monday, April 29, 2019 7:49 AM