473,479 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Master Pages not displaying ... ?

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
9 2502
did you write something in the Master page?

Apr 28 '06 #2
did you write something in the Master page?

Apr 28 '06 #3
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

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


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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4378
by: Raphael Gluck | last post by:
Hi Everyone I am having some problems with a master detail page i have set up to catalogue brochures from my site. On my master page www.tripakltd.com/brochures.asp users are invited to select...
5
2396
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
20
2393
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
1
1846
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The...
20
3335
by: M.Siler | last post by:
Let me first by saying I am NOT a .net programmer, but am very skilled with ASP, JavaScript, HTML, DHTML, Flash development. I've been reading through posts here about Frames vs. Master Pages and...
0
1043
by: Mr. K.V.B.L. | last post by:
I am a volunteer webmaster for a cycling club and a newbie. I have put together a website that uses nested master pages and ironically, the website will not display correctly on IE but does for...
17
3132
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
2
1105
by: Tina | last post by:
I have a new 2.0 app with Master page and content pages. Looks great in I.E. When viewing in firefox the content pages render too high and the content overlaps the content in the top portion of...
3
5959
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent...
0
7027
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7019
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7067
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6847
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4463
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2980
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.