By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,876 Members | 1,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,876 IT Pros & Developers. It's quick & easy.

Master Pages not displaying ... ?

P: n/a
Hi,

I've just been working through several examples of how to create Master
pages and then create content pages which are linked, but I cannot see the
Master page when I'm viewing the content page in "Design", nor do I see it
when I'm viewing the page in the browser.

I'm adding the Master page through the Add New Item dialog, and creating Web
Forms with the "Select Master Page" option checked, then selecting the
Master page from the subsequent dialog.

I've tried the web application both using the VS 2005 built-in webserver and
my local IIS ... but nothing seems to work.

Is there anything obvious that I'm doing wrong?

Thanks in advance

PS Running Windows XP Pro on my laptop and here's a dump from the VS about
box ...

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft Visual Basic 2005 77626-009-0000007-41131
Microsoft Visual Basic 2005

Microsoft Visual C# 2005 77626-009-0000007-41131
Microsoft Visual C# 2005

Microsoft Visual C++ 2005 77626-009-0000007-41131
Microsoft Visual C++ 2005

Microsoft Visual J# 2005 77626-009-0000007-41131
Microsoft Visual J# 2005

Microsoft Visual Web Developer 2005 77626-009-0000007-41131
Microsoft Visual Web Developer 2005

Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 9.00.1399.00

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00
Apr 28 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
did you write something in the Master page?

Apr 28 '06 #2

P: n/a
did you write something in the Master page?

Apr 28 '06 #3

P: n/a
Have you got a ContentPlaceHolder control in your master page?

"Andrew Kidd" wrote:
Hi,

I've just been working through several examples of how to create Master
pages and then create content pages which are linked, but I cannot see the
Master page when I'm viewing the content page in "Design", nor do I see it
when I'm viewing the page in the browser.

I'm adding the Master page through the Add New Item dialog, and creating Web
Forms with the "Select Master Page" option checked, then selecting the
Master page from the subsequent dialog.

I've tried the web application both using the VS 2005 built-in webserver and
my local IIS ... but nothing seems to work.

Is there anything obvious that I'm doing wrong?

Thanks in advance

PS Running Windows XP Pro on my laptop and here's a dump from the VS about
box ...

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft Visual Basic 2005 77626-009-0000007-41131
Microsoft Visual Basic 2005

Microsoft Visual C# 2005 77626-009-0000007-41131
Microsoft Visual C# 2005

Microsoft Visual C++ 2005 77626-009-0000007-41131
Microsoft Visual C++ 2005

Microsoft Visual J# 2005 77626-009-0000007-41131
Microsoft Visual J# 2005

Microsoft Visual Web Developer 2005 77626-009-0000007-41131
Microsoft Visual Web Developer 2005

Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 9.00.1399.00

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00

Apr 28 '06 #4

P: n/a

Thanks for the reply.

Here's the source:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
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>Master Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
<img alt="imgLogo" id="imgLogo" src="images/oreilly_logo.gif" />
<img alt="imgHeader" id="imgHeader"
src="images/oreilly_header.gif" /><br />
<hr />
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

"NIan" <we*******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
did you write something in the Master page?

Apr 28 '06 #5

P: n/a


Thanks for the reply.

I've got the default ContentPlaceHolder provided, into which I've put a
couple of images and a horizontal rule,

Here's the source:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
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>Master Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
<img alt="imgLogo" id="imgLogo" src="images/oreilly_logo.gif" />
<img alt="imgHeader" id="imgHeader"
src="images/oreilly_header.gif" /><br />
<hr />
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
Have you got a ContentPlaceHolder control in your master page?

"Andrew Kidd" wrote:
Hi,

I've just been working through several examples of how to create Master
pages and then create content pages which are linked, but I cannot see
the
Master page when I'm viewing the content page in "Design", nor do I see
it
when I'm viewing the page in the browser.

I'm adding the Master page through the Add New Item dialog, and creating
Web
Forms with the "Select Master Page" option checked, then selecting the
Master page from the subsequent dialog.

I've tried the web application both using the VS 2005 built-in webserver
and
my local IIS ... but nothing seems to work.

Is there anything obvious that I'm doing wrong?

Thanks in advance

PS Running Windows XP Pro on my laptop and here's a dump from the VS
about
box ...

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft Visual Basic 2005 77626-009-0000007-41131
Microsoft Visual Basic 2005

Microsoft Visual C# 2005 77626-009-0000007-41131
Microsoft Visual C# 2005

Microsoft Visual C++ 2005 77626-009-0000007-41131
Microsoft Visual C++ 2005

Microsoft Visual J# 2005 77626-009-0000007-41131
Microsoft Visual J# 2005

Microsoft Visual Web Developer 2005 77626-009-0000007-41131
Microsoft Visual Web Developer 2005

Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 9.00.1399.00

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00

Apr 28 '06 #6

P: n/a
There is nothing to display in the masterpage apart from the default images
that are within the ContentPlaceholder this will only display if you do not
have a Content section that has a ContentPlaceHolderID="ContentPlaceHolder1"
property in you child page. e.g. like below

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server"></asp:content>

If you have the above line in your child page then it won't display anything
from the master page because there is nothing to display.

"Andrew Kidd" wrote:


Thanks for the reply.

I've got the default ContentPlaceHolder provided, into which I've put a
couple of images and a horizontal rule,

Here's the source:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
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>Master Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
<img alt="imgLogo" id="imgLogo" src="images/oreilly_logo.gif" />
<img alt="imgHeader" id="imgHeader"
src="images/oreilly_header.gif" /><br />
<hr />
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
Have you got a ContentPlaceHolder control in your master page?

"Andrew Kidd" wrote:
Hi,

I've just been working through several examples of how to create Master
pages and then create content pages which are linked, but I cannot see
the
Master page when I'm viewing the content page in "Design", nor do I see
it
when I'm viewing the page in the browser.

I'm adding the Master page through the Add New Item dialog, and creating
Web
Forms with the "Select Master Page" option checked, then selecting the
Master page from the subsequent dialog.

I've tried the web application both using the VS 2005 built-in webserver
and
my local IIS ... but nothing seems to work.

Is there anything obvious that I'm doing wrong?

Thanks in advance

PS Running Windows XP Pro on my laptop and here's a dump from the VS
about
box ...

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft Visual Basic 2005 77626-009-0000007-41131
Microsoft Visual Basic 2005

Microsoft Visual C# 2005 77626-009-0000007-41131
Microsoft Visual C# 2005

Microsoft Visual C++ 2005 77626-009-0000007-41131
Microsoft Visual C++ 2005

Microsoft Visual J# 2005 77626-009-0000007-41131
Microsoft Visual J# 2005

Microsoft Visual Web Developer 2005 77626-009-0000007-41131
Microsoft Visual Web Developer 2005

Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 9.00.1399.00

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.1399.00

SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 9.00.1399.00


Apr 28 '06 #7

P: n/a
it looks like you have default content in the Master Page,
If the Child Page have the contentId equal to your default contentId
it will replace the content in the default contentId,
so ContentPlaceHolder1 int your child page, be empty because there is
no content in the child content.

if you want to have the content share through out entire website.
bring the default content in the master page,
and put it out side of the contentplaceholder
Andrew Kidd wrote:
Thanks for the reply.

Here's the source:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
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>Master Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
<img alt="imgLogo" id="imgLogo" src="images/oreilly_logo.gif" />
<img alt="imgHeader" id="imgHeader"
src="images/oreilly_header.gif" /><br />
<hr />
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

"NIan" <we*******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
did you write something in the Master page?


Apr 29 '06 #8

P: n/a
A real "Doh" moment for me ... lol .. Thanks for the enlightenment.

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:C0**********************************@microsof t.com...
There is nothing to display in the masterpage apart from the default
images
that are within the ContentPlaceholder this will only display if you do
not
have a Content section that has a
ContentPlaceHolderID="ContentPlaceHolder1"
property in you child page. e.g. like below

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server"></asp:content>

If you have the above line in your child page then it won't display
anything
from the master page because there is nothing to display.

"Andrew Kidd" wrote:


Thanks for the reply.

I've got the default ContentPlaceHolder provided, into which I've put a
couple of images and a horizontal rule,

Here's the source:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
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>Master Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
<img alt="imgLogo" id="imgLogo" src="images/oreilly_logo.gif"
/>
<img alt="imgHeader" id="imgHeader"
src="images/oreilly_header.gif" /><br />
<hr />
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

"clickon" <cl*****@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
> Have you got a ContentPlaceHolder control in your master page?
>
> "Andrew Kidd" wrote:
>
>> Hi,
>>
>> I've just been working through several examples of how to create
>> Master
>> pages and then create content pages which are linked, but I cannot see
>> the
>> Master page when I'm viewing the content page in "Design", nor do I
>> see
>> it
>> when I'm viewing the page in the browser.
>>
>> I'm adding the Master page through the Add New Item dialog, and
>> creating
>> Web
>> Forms with the "Select Master Page" option checked, then selecting the
>> Master page from the subsequent dialog.
>>
>> I've tried the web application both using the VS 2005 built-in
>> webserver
>> and
>> my local IIS ... but nothing seems to work.
>>
>> Is there anything obvious that I'm doing wrong?
>>
>> Thanks in advance
>>
>> PS Running Windows XP Pro on my laptop and here's a dump from the VS
>> about
>> box ...
>>
>> Microsoft Visual Studio 2005
>> Version 8.0.50727.42 (RTM.050727-4200)
>> Microsoft .NET Framework
>> Version 2.0.50727
>>
>> Installed Edition: Professional
>>
>> Microsoft Visual Basic 2005 77626-009-0000007-41131
>> Microsoft Visual Basic 2005
>>
>> Microsoft Visual C# 2005 77626-009-0000007-41131
>> Microsoft Visual C# 2005
>>
>> Microsoft Visual C++ 2005 77626-009-0000007-41131
>> Microsoft Visual C++ 2005
>>
>> Microsoft Visual J# 2005 77626-009-0000007-41131
>> Microsoft Visual J# 2005
>>
>> Microsoft Visual Web Developer 2005 77626-009-0000007-41131
>> Microsoft Visual Web Developer 2005
>>
>> Crystal Reports AAC60-G0CSA4B-V7000AY
>> Crystal Reports for Visual Studio 2005
>>
>>
>> SQL Server Analysis Services
>> Microsoft SQL Server Analysis Services Designer
>> Version 9.00.1399.00
>>
>> SQL Server Integration Services
>> Microsoft SQL Server Integration Services Designer
>> Version 9.00.1399.00
>>
>> SQL Server Reporting Services
>> Microsoft SQL Server Reporting Services Designers
>> Version 9.00.1399.00
>>
>>
>>


Apr 29 '06 #9

P: n/a
A real "Doh" moment for me ... lol .. Thanks for the enlightenment.
"NIan" <we*******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
it looks like you have default content in the Master Page,
If the Child Page have the contentId equal to your default contentId
it will replace the content in the default contentId,
so ContentPlaceHolder1 int your child page, be empty because there is
no content in the child content.

if you want to have the content share through out entire website.
bring the default content in the master page,
and put it out side of the contentplaceholder
Andrew Kidd wrote:
Thanks for the reply.

Here's the source:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
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>Master Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
<img alt="imgLogo" id="imgLogo" src="images/oreilly_logo.gif"
/>
<img alt="imgHeader" id="imgHeader"
src="images/oreilly_header.gif" /><br />
<hr />
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

"NIan" <we*******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
> did you write something in the Master page?
>

Apr 29 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.