如何在一个网站中使用两个母版页 [英] how to using of two master page in one website

查看:182
本文介绍了如何在一个网站中使用两个母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在网站上使用两个母版页时,它将自动加载其中一个母版页并显示错误

第1行:<%@页面标题=" Language ="C#" MasterPageFile =〜/Masterinner.master" AutoEventWireup ="true" CodeFile ="frmsrc.aspx.cs" Inherits ="_ Default"%>
第2行:
第3行:< asp:Content ID ="Content1" ContentPlaceHolderID ="ContentPlaceHolder1" Runat ="Server">

when i use two master page in my website it will mot load my one of the master page and shows an error

Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/Masterinner.master" AutoEventWireup="true" CodeFile="frmsrc.aspx.cs" Inherits="_Default" %>
Line 2:
Line 3: <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

推荐答案

您可以使用三个 [
You can use nested master pages[^].

The other option you have is to use master pages at three[^] levels - page, master and application.


这篇关于如何在一个网站中使用两个母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆