i have already a default.aspx page with headers,css everything.now i created a new master page.i need my default page as contect page to this master containing stylesheets.i need to know about the merging of these 2 and the style sheets must be applied properly for each.thanks in advance
master pages and content pages in .net
Collapse
X
-
Originally posted by rathiagui have already a default.aspx page with headers,css everything.now i created a new master page.i need my default page as contect page to this master containing stylesheets.i need to know about the merging of these 2 and the style sheets must be applied properly for each.thanks in advance
--
Kestrel -
Hi,
Create the master page with all of the content that will be common across the pages that use that master page (e.g. header, footer, navigation etc.). The asp:ContentPlac eHolder tag is used as a place holder for the content in the master page. The id of the ContentPlaceHol der is used as a reference in the content file.
The content for each page is then created in its own file. Add a MasterPageFile attribute to the page directive which specifies the master file:
Code:<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="contentpage.aspx.vb" Inherits="contentpage" title="Master page demo" %>
As the ContentPlaceHol der is a server control it must be within the asp form. This means that the code in the head of the final document will be the same in all of the pages that use this page. The links to the CSS stylesheets will be in the head of the document so all of the documents that use the same master page will import the same CSS stylesheets.
Hope this helpsComment
Comment