Hi all, I was having a look at this tutorial on asp.net master pages http://www.asp.net/web-forms/overview/older-versions-getting-started/master-pages/creating-a-site-wide-layout-using-master-pages-cs but alas I have to apply this the other way around: as you would normally expect, you'd create the master page first and then content pages, but I have content pages and now I have to create a master page and link it to the content pages. Is this doable or do I have to create a master page first and then content pages? Unfortunately when I begun to work to my asp.net current project I didn't even know that master pages existed!
Violet_82
89
Posting Whiz in Training
Recommended Answers
Jump to PostYes, it's doable. In your content pages you can just state that you are uing a master page:
<%@ Page Language="C#" MasterPageFile="~/Site.Master" CodeBehind="Content.aspx.cs" Inherits="Content" %>
My master page contains:
<asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder>
My content page has this:
<asp:Content …
All 2 Replies
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
JorgeM
commented:
I thought you were only a php guy. i'm impressed!
+12
Violet_82
89
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.