如何在浏览器中查看母版页 [英] how to view master page in browser

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

问题描述

仅学习母版页,我有一个包含内容的母版页.但是如何在浏览器中查看页面.master?它的网址是什么?

just learning master page, i have a master page which include a content. but how to view the page .master in browser? what it the url?

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>

推荐答案

否,您不能在浏览器中查看母版页(.master)-因为它是not an actual page,但是包含了一个控件.aspx页面的内容.

No, you can not view master page (.master) in browser - because it is not an actual page but a Control which encloses the content of .aspx pages.

当用户请求内容页(.aspx)时,他们与母版页(.master)合并以产生将母版页的布局与内容页中的内容组合在一起的输出.

When users request the content pages(.aspx), they merge with the master page (.master) to produce output that combines the layout of the master page with the content from the content page.

单个母版页定义了应用程序中所有页面(或一组页面)所需的外观和标准行为.

A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application.

有关更多信息,请阅读- ASP .NET母版页

For more information please read - ASP.NET Master Pages

这篇关于如何在浏览器中查看母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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