Last post Apr 29, 2019 07:49 AM by Ackerly Xu
Apr 26, 2019 03:57 PM|dlchase|LINK
What is the easiest way to remove a master page from an aspx page?
Apr 26, 2019 04:41 PM|PatriceSc|LINK
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.
Apr 26, 2019 05:12 PM|dlchase|LINK
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?
Apr 29, 2019 07:49 AM|Ackerly Xu|LINK
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 ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">