Question : General question about MasterPages and ContentPlaceHolders

Hey guys,

there is something about master pages and ContentPlaceHolders that I don't understand.

1. I created a new master page.
2. I added some extra ContentPlaceholders, in order to have a header, a content area and a footer in all my content pages.
3. I added some simple server controls to one of the ContentPlaceHolders.
4. I added a link to a stylesheet in the default ContentPlaceHolder.
5. I saved the master page.
6. I created a new Web Content Form and picked the master page I had just saved before as Master Page.
7. Visual Studio 2008 produces the markup code shown below.

The markup code of the content page contains all PlaceHolder controls I would expect.

But they are all empty at design time AND also at run time. So:

- NO stylesheet link
- NO panel or label control

Am I expecting too much or am I missing something?

Thanks for any help!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
Masterpage
---------------------------------------------------
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="pv.master.cs" Inherits="pv.Web.Candidate.MasterPages.pv" %>
 



    Untitled Page
    
        
    


    
    
Contentpage --------------------------------------------------- <%@ Page Language="C#" MasterPageFile="~/MasterPages/pv.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="pv.Web.Candidate.Pages.WebForm1" Title="Untitled Page" %>

Answer : General question about MasterPages and ContentPlaceHolders

well now i got it once you have the contentplaceholder defined in content page it inherits the masters content (label, etc...), just remove the code below resolves.
Just now i read the article and tested too.. this works

(cphHeader)
1:
2:
<asp:Content ID="Content2" ContentPlaceHolderID="cphHeader" runat="server">
</asp:Content>
Random Solutions  
 
programming4us programming4us