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>
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.
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.
For more information please read - ASP.NET Master Pages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With