473,708 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Master pages, how to make them work?

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 pages? Kinda sorta a critical
point no?

Am I missing something?

Rob.

P.S. the day I find a book that actually is useful rather than just a
checkmark next to "covered that topic" -- of course there is MSDN (what a
joke that is, worst documentation I've ever wittnessed -- samples?? no
links or lists of what parameters can be used, nothing. Sorry, just very
frustrated with complete lack of useful documentation that doesn't require
many hours playing the search and hunt game. If I documented my code as
poorly as MSDN documents VS 2005, I would be out of a job a long time ago.
May 23 '06 #1
17 3156
Professional ASP.NET 2.0 from Wrox is my Bible :-D since ASP 3.0 I just love
their books ...

....but, back to your problem...

hopping that you have the same book, look at page 252 and you will see that
they have 2 files

MyMaster.master (the master page) and
Default.aspx (the default page)

in Listing 8.1: A sample Master Page (p.254)
you can see that ALL MASTER PAGES start with:

<%@ Master ...

and in the Listing 8.3: The content page that uses Wrox.Master (p.258)
you can see that ALL CONTENT PAGES have in the start line
<%@ ... MasterPageFile= "Wrox.maste r" ...
even if you do not have the book, I think I made my point ;-)

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
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 pages? Kinda sorta a critical
point no?

Am I missing something?

Rob.

P.S. the day I find a book that actually is useful rather than just a
checkmark next to "covered that topic" -- of course there is MSDN (what a
joke that is, worst documentation I've ever wittnessed -- samples?? no
links or lists of what parameters can be used, nothing. Sorry, just very
frustrated with complete lack of useful documentation that doesn't require
many hours playing the search and hunt game. If I documented my code as
poorly as MSDN documents VS 2005, I would be out of a job a long time ago.

May 23 '06 #2
I forgot to tell you...

in your Master.Page you need to have a minimum of ONE ContentPlaceHol der,
like

<asp:ContentPla ceHolder id="leftPane" runat="server" >
</asp:ContentPlac eHolder>

so, the Server could take the conten page and put the actual content in the
place holder
in your content pages you need to write the code inside a PlaceHolder
control, using the example above:

<asp:Content id="myLeftConte nt" ContentPlaceHol der="leftPane"
runat="server">

... your html / asp.net / javascript code :-)

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
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 pages? Kinda sorta a critical
point no?

Am I missing something?

Rob.

P.S. the day I find a book that actually is useful rather than just a
checkmark next to "covered that topic" -- of course there is MSDN (what a
joke that is, worst documentation I've ever wittnessed -- samples?? no
links or lists of what parameters can be used, nothing. Sorry, just very
frustrated with complete lack of useful documentation that doesn't require
many hours playing the search and hunt game. If I documented my code as
poorly as MSDN documents VS 2005, I would be out of a job a long time ago.

May 23 '06 #3
Nope not getting it, yes I have the book.

In my Master.master I have an HTML table laided out with tranditional Header
(top), LeftSideBar (left), Primary Content (middle), Footer (bottom) in each
table cell has ContentPlaceHol der (IDs, cph_Header, cph_LeftSideBar ,
cph_PrimaryCont ent, cph_Footer).

I've created a Header.aspx that links to the Master,

in Header.aspx --
....@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Heade r.aspx.vb" Inherits="Heade r"
title="Header". ..

....<asp:Conten t ID="c_Header" ContentPlaceHol derID="cph_Head er"
Runat="Server"> ...

in Footer.aspx --
....@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Foote r.aspx.vb" Inherits="Foote r"
title="Footer". ..

....<asp:Conten t ID="c_Footer" ContentPlaceHol derID="cph_Foot er"
Runat="Server"> ...

in LeftSideBar.asp x
....@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="LeftS ideBar.aspx.vb"
Inherits="LeftS ideBar" title="SideBar" ...

....<asp:Conten t ID="c_LeftSideB ar" ContentPlaceHol derID="cph_Left SideBar"
Runat="Server"> ...

in PrimaryContent. aspx
....@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Prima ryContent.aspx. vb"
Inherits="Prima ryContent" title="Content" ...

....<asp:Conten t ID="c_PrimaryCo ntent"
ContentPlaceHol derID="cph_Prim aryContent" Runat="Server"> ...

So what page do I reference if I'm testing from a Browser?? Do I need yet
another page?? This is where I'm confused. I can't reference Master.master
as that means nothing. What I would have expected VS 2005 to do (if I were
on the dev team that created VS) is automatically create a Master.aspx
(which is what I would reference from a Browser session) -- but VS 2005
doesn't do this so I'm stuck at this point?

Thanks, Rob.
"Bruno Alexandre" <br*********@gm ail.com> wrote in message
news:uJ******** ******@TK2MSFTN GP04.phx.gbl...
I forgot to tell you...

in your Master.Page you need to have a minimum of ONE ContentPlaceHol der,
like

<asp:ContentPla ceHolder id="leftPane" runat="server" >
</asp:ContentPlac eHolder>

so, the Server could take the conten page and put the actual content in
the place holder
in your content pages you need to write the code inside a PlaceHolder
control, using the example above:

<asp:Content id="myLeftConte nt" ContentPlaceHol der="leftPane"
runat="server">

... your html / asp.net / javascript code :-)

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
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 pages? Kinda sorta a
critical point no?

Am I missing something?

Rob.

P.S. the day I find a book that actually is useful rather than just a
checkmark next to "covered that topic" -- of course there is MSDN (what a
joke that is, worst documentation I've ever wittnessed -- samples?? no
links or lists of what parameters can be used, nothing. Sorry, just very
frustrated with complete lack of useful documentation that doesn't
require many hours playing the search and hunt game. If I documented my
code as poorly as MSDN documents VS 2005, I would be out of a job a long
time ago.


May 23 '06 #4
Master Pages don't work the same as a frameset.

I have 1 master page that has my header, footer and sidebar in it. This is
all part of the masterpage. I then have a single content holder that is the
are where all my pages will show up.

When I call one of those pages (for instance default.aspx which is my home
page) it displays showing the master page content as well.

If I'm reading your stuff write you are kind of defeating the object of
having a master page. If your header and footer etc are never going to
change throughout your site then put that info directly into the master
page.

Victoria

"Rob R. Ainscough" <ro*****@pacbel l.net> wrote in message
news:O4******** ******@TK2MSFTN GP05.phx.gbl...
Nope not getting it, yes I have the book.

In my Master.master I have an HTML table laided out with tranditional Header (top), LeftSideBar (left), Primary Content (middle), Footer (bottom) in each table cell has ContentPlaceHol der (IDs, cph_Header, cph_LeftSideBar ,
cph_PrimaryCont ent, cph_Footer).

May 23 '06 #5
nahhhh...

there is no 4 content pages... just ONE content page with 4 asp:Content

------------------- master.page -----------------------------
<%@ master language="VB" %>

<script runat="server">
</script>

<html>
<head>
...
</head>
<body>

...
<asp:ContentPla ceHolder id="cph_Header " runat="server"
</asp:ContentPlac eHolder> ...
<asp:ContentPla ceHolder id="leftPane" runat="server"</asp:ContentPlac eHolder> ...
<asp:ContentPla ceHolder id="cph_LeftSid eBar" runat="server"</asp:ContentPlac eHolder> ...
<asp:ContentPla ceHolder id="cph_Footer " runat="server"</asp:ContentPlac eHolder>

</body>
</html>

------------------- default.aspx -----------------------------
<%@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Heade r.aspx.vb" Inherits="Heade r"
title="Header"% >

<script runat="server">
</script>

<asp:Content ID="c_Header" ContentPlaceHol derID="cph_Head er" Runat="Server">
... the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryCo ntent" ContentPlaceHol derID="cph_Prim aryContent"
Runat="Server">
... the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideB ar" ContentPlaceHol derID="cph_Left SideBar"
Runat="Server">
... the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHol derID="cph_Foot er" Runat="Server">
... the content to add the Footer will be here
</asp:Content>

----------------------------------------------------------------

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:O4******** ******@TK2MSFTN GP05.phx.gbl... Nope not getting it, yes I have the book.

In my Master.master I have an HTML table laided out with tranditional
Header (top), LeftSideBar (left), Primary Content (middle), Footer
(bottom) in each table cell has ContentPlaceHol der (IDs, cph_Header,
cph_LeftSideBar , cph_PrimaryCont ent, cph_Footer).

I've created a Header.aspx that links to the Master,

in Header.aspx --
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Heade r.aspx.vb" Inherits="Heade r"
title="Header". ..

...<asp:Content ID="c_Header" ContentPlaceHol derID="cph_Head er"
Runat="Server"> ...

in Footer.aspx --
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Foote r.aspx.vb" Inherits="Foote r"
title="Footer". ..

...<asp:Content ID="c_Footer" ContentPlaceHol derID="cph_Foot er"
Runat="Server"> ...

in LeftSideBar.asp x
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="LeftS ideBar.aspx.vb"
Inherits="LeftS ideBar" title="SideBar" ...

...<asp:Content ID="c_LeftSideB ar" ContentPlaceHol derID="cph_Left SideBar"
Runat="Server"> ...

in PrimaryContent. aspx
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Prima ryContent.aspx. vb"
Inherits="Prima ryContent" title="Content" ...

...<asp:Content ID="c_PrimaryCo ntent"
ContentPlaceHol derID="cph_Prim aryContent" Runat="Server"> ...

So what page do I reference if I'm testing from a Browser?? Do I need yet
another page?? This is where I'm confused. I can't reference
Master.master as that means nothing. What I would have expected VS 2005
to do (if I were on the dev team that created VS) is automatically create
a Master.aspx (which is what I would reference from a Browser session) --
but VS 2005 doesn't do this so I'm stuck at this point?

Thanks, Rob.
"Bruno Alexandre" <br*********@gm ail.com> wrote in message
news:uJ******** ******@TK2MSFTN GP04.phx.gbl...
I forgot to tell you...

in your Master.Page you need to have a minimum of ONE ContentPlaceHol der,
like

<asp:ContentPla ceHolder id="leftPane" runat="server" >
</asp:ContentPlac eHolder>

so, the Server could take the conten page and put the actual content in
the place holder
in your content pages you need to write the code inside a PlaceHolder
control, using the example above:

<asp:Content id="myLeftConte nt" ContentPlaceHol der="leftPane"
runat="server">

... your html / asp.net / javascript code :-)

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
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 pages? Kinda sorta
a critical point no?

Am I missing something?

Rob.

P.S. the day I find a book that actually is useful rather than just a
checkmark next to "covered that topic" -- of course there is MSDN (what
a joke that is, worst documentation I've ever wittnessed -- samples??
no links or lists of what parameters can be used, nothing. Sorry, just
very frustrated with complete lack of useful documentation that doesn't
require many hours playing the search and hunt game. If I documented my
code as poorly as MSDN documents VS 2005, I would be out of a job a long
time ago.



May 23 '06 #6
So, how do you control the flow of each content controls and their contents?

You have absolutely defeated the purpose of the master page. Instead of
content holders for each section of your page's layout, instead take the
content that you would have inside of each of those content holders and put
them directly in your master page.

--
-Demetri
"Bruno Alexandre" wrote:
nahhhh...

there is no 4 content pages... just ONE content page with 4 asp:Content

------------------- master.page -----------------------------
<%@ master language="VB" %>

<script runat="server">
</script>

<html>
<head>
...
</head>
<body>

...
<asp:ContentPla ceHolder id="cph_Header " runat="server"
></asp:ContentPlac eHolder>

...
<asp:ContentPla ceHolder id="leftPane" runat="server"
></asp:ContentPlac eHolder>

...
<asp:ContentPla ceHolder id="cph_LeftSid eBar" runat="server"
></asp:ContentPlac eHolder>

...
<asp:ContentPla ceHolder id="cph_Footer " runat="server"
></asp:ContentPlac eHolder>

</body>
</html>

------------------- default.aspx -----------------------------
<%@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Heade r.aspx.vb" Inherits="Heade r"
title="Header"% >

<script runat="server">
</script>

<asp:Content ID="c_Header" ContentPlaceHol derID="cph_Head er" Runat="Server">
... the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryCo ntent" ContentPlaceHol derID="cph_Prim aryContent"
Runat="Server">
... the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideB ar" ContentPlaceHol derID="cph_Left SideBar"
Runat="Server">
... the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHol derID="cph_Foot er" Runat="Server">
... the content to add the Footer will be here
</asp:Content>

----------------------------------------------------------------

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:O4******** ******@TK2MSFTN GP05.phx.gbl...
Nope not getting it, yes I have the book.

In my Master.master I have an HTML table laided out with tranditional
Header (top), LeftSideBar (left), Primary Content (middle), Footer
(bottom) in each table cell has ContentPlaceHol der (IDs, cph_Header,
cph_LeftSideBar , cph_PrimaryCont ent, cph_Footer).

I've created a Header.aspx that links to the Master,

in Header.aspx --
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Heade r.aspx.vb" Inherits="Heade r"
title="Header". ..

...<asp:Content ID="c_Header" ContentPlaceHol derID="cph_Head er"
Runat="Server"> ...

in Footer.aspx --
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Foote r.aspx.vb" Inherits="Foote r"
title="Footer". ..

...<asp:Content ID="c_Footer" ContentPlaceHol derID="cph_Foot er"
Runat="Server"> ...

in LeftSideBar.asp x
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="LeftS ideBar.aspx.vb"
Inherits="LeftS ideBar" title="SideBar" ...

...<asp:Content ID="c_LeftSideB ar" ContentPlaceHol derID="cph_Left SideBar"
Runat="Server"> ...

in PrimaryContent. aspx
...@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Prima ryContent.aspx. vb"
Inherits="Prima ryContent" title="Content" ...

...<asp:Content ID="c_PrimaryCo ntent"
ContentPlaceHol derID="cph_Prim aryContent" Runat="Server"> ...

So what page do I reference if I'm testing from a Browser?? Do I need yet
another page?? This is where I'm confused. I can't reference
Master.master as that means nothing. What I would have expected VS 2005
to do (if I were on the dev team that created VS) is automatically create
a Master.aspx (which is what I would reference from a Browser session) --
but VS 2005 doesn't do this so I'm stuck at this point?

Thanks, Rob.
"Bruno Alexandre" <br*********@gm ail.com> wrote in message
news:uJ******** ******@TK2MSFTN GP04.phx.gbl...
I forgot to tell you...

in your Master.Page you need to have a minimum of ONE ContentPlaceHol der,
like

<asp:ContentPla ceHolder id="leftPane" runat="server" >
</asp:ContentPlac eHolder>

so, the Server could take the conten page and put the actual content in
the place holder
in your content pages you need to write the code inside a PlaceHolder
control, using the example above:

<asp:Content id="myLeftConte nt" ContentPlaceHol der="leftPane"
runat="server">

... your html / asp.net / javascript code :-)

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
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 pages? Kinda sorta
a critical point no?

Am I missing something?

Rob.

P.S. the day I find a book that actually is useful rather than just a
checkmark next to "covered that topic" -- of course there is MSDN (what
a joke that is, worst documentation I've ever wittnessed -- samples??
no links or lists of what parameters can be used, nothing. Sorry, just
very frustrated with complete lack of useful documentation that doesn't
require many hours playing the search and hunt game. If I documented my
code as poorly as MSDN documents VS 2005, I would be out of a job a long
time ago.



May 23 '06 #7
dam dude!!!

do you work with CorelDRAW?? it uses Master Pages in Object Manager

ONE DESIGN = Multiple pages

the propose of master pages is to have one page with the design, and the
rest is only content!, for example Microsoft website: the design is the same
for every page!!! what does it chage? left side options (is a menu with
diferent options and links on every page) so = contentplacehol der with a
menuView and you load diferent sources in every page

do you understand now?
Design is something diferent from coding... so master.pages give us the
possibility to have someone do the design, add a contentplacehol der in the
sopt and the coder do his thing to that spot...

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Demetri" <De*****@discus sions.microsoft .com> escreveu na mensagem
news:06******** *************** ***********@mic rosoft.com...
So, how do you control the flow of each content controls and their
contents?

You have absolutely defeated the purpose of the master page. Instead of
content holders for each section of your page's layout, instead take the
content that you would have inside of each of those content holders and
put
them directly in your master page.

--
-Demetri
"Bruno Alexandre" wrote:
nahhhh...

there is no 4 content pages... just ONE content page with 4 asp:Content

------------------- master.page -----------------------------
<%@ master language="VB" %>

<script runat="server">
</script>

<html>
<head>
...
</head>
<body>

...
<asp:ContentPla ceHolder id="cph_Header " runat="server"
></asp:ContentPlac eHolder>

...
<asp:ContentPla ceHolder id="leftPane" runat="server"
></asp:ContentPlac eHolder>

...
<asp:ContentPla ceHolder id="cph_LeftSid eBar" runat="server"
></asp:ContentPlac eHolder>

...
<asp:ContentPla ceHolder id="cph_Footer " runat="server"
></asp:ContentPlac eHolder>

</body>
</html>

------------------- default.aspx -----------------------------
<%@ Page Language="VB" MasterPageFile= "~/Master.master"
AutoEventWireup ="false" CodeFile="Heade r.aspx.vb" Inherits="Heade r"
title="Header"% >

<script runat="server">
</script>

<asp:Content ID="c_Header" ContentPlaceHol derID="cph_Head er"
Runat="Server">
... the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryCo ntent"
ContentPlaceHol derID="cph_Prim aryContent"
Runat="Server">
... the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideB ar" ContentPlaceHol derID="cph_Left SideBar"
Runat="Server">
... the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHol derID="cph_Foot er"
Runat="Server">
... the content to add the Footer will be here
</asp:Content>

----------------------------------------------------------------

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
news:O4******** ******@TK2MSFTN GP05.phx.gbl...
> Nope not getting it, yes I have the book.
>
> In my Master.master I have an HTML table laided out with tranditional
> Header (top), LeftSideBar (left), Primary Content (middle), Footer
> (bottom) in each table cell has ContentPlaceHol der (IDs, cph_Header,
> cph_LeftSideBar , cph_PrimaryCont ent, cph_Footer).
>
> I've created a Header.aspx that links to the Master,
>
> in Header.aspx --
> ...@ Page Language="VB" MasterPageFile= "~/Master.master"
> AutoEventWireup ="false" CodeFile="Heade r.aspx.vb" Inherits="Heade r"
> title="Header". ..
>
> ...<asp:Content ID="c_Header" ContentPlaceHol derID="cph_Head er"
> Runat="Server"> ...
>
> in Footer.aspx --
> ...@ Page Language="VB" MasterPageFile= "~/Master.master"
> AutoEventWireup ="false" CodeFile="Foote r.aspx.vb" Inherits="Foote r"
> title="Footer". ..
>
> ...<asp:Content ID="c_Footer" ContentPlaceHol derID="cph_Foot er"
> Runat="Server"> ...
>
> in LeftSideBar.asp x
> ...@ Page Language="VB" MasterPageFile= "~/Master.master"
> AutoEventWireup ="false" CodeFile="LeftS ideBar.aspx.vb"
> Inherits="LeftS ideBar" title="SideBar" ...
>
> ...<asp:Content ID="c_LeftSideB ar"
> ContentPlaceHol derID="cph_Left SideBar"
> Runat="Server"> ...
>
> in PrimaryContent. aspx
> ...@ Page Language="VB" MasterPageFile= "~/Master.master"
> AutoEventWireup ="false" CodeFile="Prima ryContent.aspx. vb"
> Inherits="Prima ryContent" title="Content" ...
>
> ...<asp:Content ID="c_PrimaryCo ntent"
> ContentPlaceHol derID="cph_Prim aryContent" Runat="Server"> ...
>
> So what page do I reference if I'm testing from a Browser?? Do I need
> yet
> another page?? This is where I'm confused. I can't reference
> Master.master as that means nothing. What I would have expected VS
> 2005
> to do (if I were on the dev team that created VS) is automatically
> create
> a Master.aspx (which is what I would reference from a Browser
> session) --
> but VS 2005 doesn't do this so I'm stuck at this point?
>
> Thanks, Rob.
>
>
> "Bruno Alexandre" <br*********@gm ail.com> wrote in message
> news:uJ******** ******@TK2MSFTN GP04.phx.gbl...
>>I forgot to tell you...
>>
>> in your Master.Page you need to have a minimum of ONE
>> ContentPlaceHol der,
>> like
>>
>> <asp:ContentPla ceHolder id="leftPane" runat="server" >
>> </asp:ContentPlac eHolder>
>>
>> so, the Server could take the conten page and put the actual content
>> in
>> the place holder
>>
>>
>> in your content pages you need to write the code inside a PlaceHolder
>> control, using the example above:
>>
>> <asp:Content id="myLeftConte nt" ContentPlaceHol der="leftPane"
>> runat="server">
>>
>> ... your html / asp.net / javascript code :-)
>>
>> </asp:Content>
>>
>>
>>
>>
>> --
>>
>> Bruno Alexandre
>> (a Portuguese in Københanv, Danmark)
>>
>>
>> "Rob R. Ainscough" <ro*****@pacbel l.net> escreveu na mensagem
>> news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>>> 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 pages? Kinda
>>> sorta
>>> a critical point no?
>>>
>>> Am I missing something?
>>>
>>> Rob.
>>>
>>> P.S. the day I find a book that actually is useful rather than just a
>>> checkmark next to "covered that topic" -- of course there is MSDN
>>> (what
>>> a joke that is, worst documentation I've ever wittnessed -- samples??
>>> no links or lists of what parameters can be used, nothing. Sorry,
>>> just
>>> very frustrated with complete lack of useful documentation that
>>> doesn't
>>> require many hours playing the search and hunt game. If I documented
>>> my
>>> code as poorly as MSDN documents VS 2005, I would be out of a job a
>>> long
>>> time ago.
>>>
>>
>>
>
>


May 23 '06 #8
"Demetri" <De*****@discus sions.microsoft .com> wrote in message
news:06******** *************** ***********@mic rosoft.com...
So, how do you control the flow of each content controls and their
contents?


http://www.ftponline.com/books/chapters/0735620245.pdf
May 23 '06 #9
Ok, so I've put my header/footer code on my Master page and now have a
single main.aspx page. But, I'm still confused on how to get my other pages
i.e. Login.aspx, AcctMgmt.aspx, CustInfo.aspx etc. to be displayed in the
ContentPlaceHol der (cph_PrimaryCon tent) on my Master page?

I'm assuming, I will need to create a login.aspx as a content page and point
it to my master.page? But how do I dynamically change what page is
displayed in my ContentPlaceHol der (cph_PrimaryCon tent) ? i.e. user clicks
on a button in my sidebar which then need to load a page into my
PrimaryContent area (on my master page)? all done via code behind?
"Victoria Bolton" <morkai at dreamwolf dot net> wrote in message
news:e2******** ******@TK2MSFTN GP04.phx.gbl...
Master Pages don't work the same as a frameset.

I have 1 master page that has my header, footer and sidebar in it. This
is
all part of the masterpage. I then have a single content holder that is
the
are where all my pages will show up.

When I call one of those pages (for instance default.aspx which is my home
page) it displays showing the master page content as well.

If I'm reading your stuff write you are kind of defeating the object of
having a master page. If your header and footer etc are never going to
change throughout your site then put that info directly into the master
page.

Victoria

"Rob R. Ainscough" <ro*****@pacbel l.net> wrote in message
news:O4******** ******@TK2MSFTN GP05.phx.gbl...
Nope not getting it, yes I have the book.

In my Master.master I have an HTML table laided out with tranditional

Header
(top), LeftSideBar (left), Primary Content (middle), Footer (bottom) in

each
table cell has ContentPlaceHol der (IDs, cph_Header, cph_LeftSideBar ,
cph_PrimaryCont ent, cph_Footer).


May 23 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
290
by: Murphy | last post by:
I have read the articles by Paul Wilson regarding master pages, and apart from being totally confused I would like to clarify the following before investing any further time on researching these concepts. Are master pages reliable or are they a buggy concept ? I understand master pages will be included in the next version of the framework ? Is there a reason not to use them presently ? Where can I obtain further documentation of the...
20
2422
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 include files to change the layout. When I came to ASP.NET, I used user controls to do a similar thing. I have just been looking at master pages, and it looks like they do the same thing. If so, is there any advantage in using them over the...
7
8726
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will remain the same. I am interested to know your opinions/suggestions in finding an easy way of doing it. In asp one could have something like this:
11
1464
by: Just Me | last post by:
I can see master pages being useful if one wants some fragil or complex web design which one does not want to have altered, but thats were it stops as far as I can see. Master Pages Plus 1.) Consistent Design. Master Pages Minus
4
4014
by: evantay | last post by:
I'm using ASP.NET 2.0 with VS.NET 2005. I'm trying to access properties from my master pages within a page that inherits from that master page (a child page). However the values are always null. In my masterpage I have this: private bool m_AlreadyTested; public bool AlreadyTested { get { return m_AlreadyTested; }
7
1322
by: Dwight Johnson | last post by:
I am attempting to use Master Pages in a new website, and finding it troublesome. I also do not see a lot of entries in this group regarding them or their components, such as ContentPlaceHolders. So my question is: do I really want to invest the time to learn Master Page technology, or not? Does anyone have an opinion on this (silly question?) Dwight
7
1346
by: oliharvey | last post by:
I'm an experienced web developer - but haven't used master pages much. I find that I'm not really comfortable with them - so perhaps I'm missing something..... When I first read about them I was shocked that the content placeholder pages need knowledge of which master page they were in - I'm happier now I understand they can be set dynamically - but I still can't help thinking that they provide nothing on top of a reasonable...
4
1595
by: daveh551 | last post by:
I've seen reference to Nested Master Pages in some of the documentation, but I haven't been successful in creating one in VS 2005 (Framework 2.0). I just did a search on it, and "How To: Walkthrough" on Master pages listed VS 2008 and Framework 3.5 as pre- requisites. If I do an "Add New Item" selecting "Master Page", the "Use MasterPage" check box is grayed out, so it won't let me create it in VS 2005. Is there a way to "trick it"? ...
0
8788
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8697
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9290
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9159
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5939
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4454
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2508
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.