刚刚学习母版页,我有一个包含内容的母版页。但如何在浏览器中查看页面.master?它的网址是什么?如何在浏览器中查看母版页
<%@ 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>
你不能;您还必须使用该主页面创建'.aspx'页面,然后才能看到.aspx页面。 –
母版页的想法是为您的子页面提供模板。任何继承此母版页的子页面都将包含此主标记。您无法直接在浏览器中查看母版页,这没有任何意义。 –
我不明白,但主页包括header.aspx,body.aspx,left.aspx,我应该查看哪个页面? – hkguile