473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 3127
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.master" ...
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*****@pacbell.net> escreveu na mensagem
news:%2****************@TK2MSFTNGP03.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 ContentPlaceHolder,
like

<asp:ContentPlaceHolder id="leftPane" runat="server" >
</asp:ContentPlaceHolder>

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="myLeftContent" ContentPlaceHolder="leftPane"
runat="server">

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

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:%2****************@TK2MSFTNGP03.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 ContentPlaceHolder (IDs, cph_Header, cph_LeftSideBar,
cph_PrimaryContent, 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="Header.aspx.vb" Inherits="Header"
title="Header"...

....<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
Runat="Server">...

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

....<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
Runat="Server">...

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

....<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">...

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

....<asp:Content ID="c_PrimaryContent"
ContentPlaceHolderID="cph_PrimaryContent" 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*********@gmail.com> wrote in message
news:uJ**************@TK2MSFTNGP04.phx.gbl...
I forgot to tell you...

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

<asp:ContentPlaceHolder id="leftPane" runat="server" >
</asp:ContentPlaceHolder>

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="myLeftContent" ContentPlaceHolder="leftPane"
runat="server">

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

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:%2****************@TK2MSFTNGP03.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*****@pacbell.net> wrote in message
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header, cph_LeftSideBar,
cph_PrimaryContent, 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:ContentPlaceHolder id="cph_Header" runat="server"
</asp:ContentPlaceHolder> ...
<asp:ContentPlaceHolder id="leftPane" runat="server"</asp:ContentPlaceHolder> ...
<asp:ContentPlaceHolder id="cph_LeftSideBar" runat="server"</asp:ContentPlaceHolder> ...
<asp:ContentPlaceHolder id="cph_Footer" runat="server"</asp:ContentPlaceHolder>

</body>
</html>

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

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

<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header" Runat="Server">
... the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryContent" ContentPlaceHolderID="cph_PrimaryContent"
Runat="Server">
... the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">
... the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer" 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*****@pacbell.net> escreveu na mensagem
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header,
cph_LeftSideBar, cph_PrimaryContent, 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="Header.aspx.vb" Inherits="Header"
title="Header"...

...<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
Runat="Server">...

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

...<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
Runat="Server">...

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

...<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">...

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

...<asp:Content ID="c_PrimaryContent"
ContentPlaceHolderID="cph_PrimaryContent" 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*********@gmail.com> wrote in message
news:uJ**************@TK2MSFTNGP04.phx.gbl...
I forgot to tell you...

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

<asp:ContentPlaceHolder id="leftPane" runat="server" >
</asp:ContentPlaceHolder>

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="myLeftContent" ContentPlaceHolder="leftPane"
runat="server">

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

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:%2****************@TK2MSFTNGP03.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:ContentPlaceHolder id="cph_Header" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="leftPane" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_LeftSideBar" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_Footer" runat="server"
></asp:ContentPlaceHolder>

</body>
</html>

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

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

<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header" Runat="Server">
... the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryContent" ContentPlaceHolderID="cph_PrimaryContent"
Runat="Server">
... the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">
... the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer" 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*****@pacbell.net> escreveu na mensagem
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header,
cph_LeftSideBar, cph_PrimaryContent, 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="Header.aspx.vb" Inherits="Header"
title="Header"...

...<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
Runat="Server">...

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

...<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
Runat="Server">...

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

...<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">...

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

...<asp:Content ID="c_PrimaryContent"
ContentPlaceHolderID="cph_PrimaryContent" 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*********@gmail.com> wrote in message
news:uJ**************@TK2MSFTNGP04.phx.gbl...
I forgot to tell you...

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

<asp:ContentPlaceHolder id="leftPane" runat="server" >
</asp:ContentPlaceHolder>

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="myLeftContent" ContentPlaceHolder="leftPane"
runat="server">

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

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:%2****************@TK2MSFTNGP03.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 = contentplaceholder 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 contentplaceholder in the
sopt and the coder do his thing to that spot...

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Demetri" <De*****@discussions.microsoft.com> escreveu na mensagem
news:06**********************************@microsof t.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:ContentPlaceHolder id="cph_Header" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="leftPane" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_LeftSideBar" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_Footer" runat="server"
></asp:ContentPlaceHolder>

</body>
</html>

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

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

<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
Runat="Server">
... the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryContent"
ContentPlaceHolderID="cph_PrimaryContent"
Runat="Server">
... the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">
... the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
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*****@pacbell.net> escreveu na mensagem
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header,
> cph_LeftSideBar, cph_PrimaryContent, 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="Header.aspx.vb" Inherits="Header"
> title="Header"...
>
> ...<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
> Runat="Server">...
>
> in Footer.aspx --
> ...@ Page Language="VB" MasterPageFile="~/Master.master"
> AutoEventWireup="false" CodeFile="Footer.aspx.vb" Inherits="Footer"
> title="Footer"...
>
> ...<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
> Runat="Server">...
>
> in LeftSideBar.aspx
> ...@ Page Language="VB" MasterPageFile="~/Master.master"
> AutoEventWireup="false" CodeFile="LeftSideBar.aspx.vb"
> Inherits="LeftSideBar" title="SideBar"...
>
> ...<asp:Content ID="c_LeftSideBar"
> ContentPlaceHolderID="cph_LeftSideBar"
> Runat="Server">...
>
> in PrimaryContent.aspx
> ...@ Page Language="VB" MasterPageFile="~/Master.master"
> AutoEventWireup="false" CodeFile="PrimaryContent.aspx.vb"
> Inherits="PrimaryContent" title="Content"...
>
> ...<asp:Content ID="c_PrimaryContent"
> ContentPlaceHolderID="cph_PrimaryContent" 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*********@gmail.com> wrote in message
> news:uJ**************@TK2MSFTNGP04.phx.gbl...
>>I forgot to tell you...
>>
>> in your Master.Page you need to have a minimum of ONE
>> ContentPlaceHolder,
>> like
>>
>> <asp:ContentPlaceHolder id="leftPane" runat="server" >
>> </asp:ContentPlaceHolder>
>>
>> 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="myLeftContent" ContentPlaceHolder="leftPane"
>> runat="server">
>>
>> ... your html / asp.net / javascript code :-)
>>
>> </asp:Content>
>>
>>
>>
>>
>> --
>>
>> Bruno Alexandre
>> (a Portuguese in Københanv, Danmark)
>>
>>
>> "Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
>> news:%2****************@TK2MSFTNGP03.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*****@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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
ContentPlaceHolder (cph_PrimaryContent) 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 ContentPlaceHolder (cph_PrimaryContent) ? 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**************@TK2MSFTNGP04.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*****@pacbell.net> wrote in message
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header, cph_LeftSideBar,
cph_PrimaryContent, cph_Footer).


May 23 '06 #10
So if I understand you correctly, I would have to duplicate the 4 "Content"
controls for EVERY single page that I want to display -- isn't this
defeating the purpose? How is this a benefit? Maybe if I'm doing VERY
simple stuff this could be a benefit, but as it stands right now it seems to
me framesets ARE MUCH more powerful and flexible.

I guess I'm missing something obvious?

I still don't see how a Master page can dynamically using different content
pages via code behind processing?

I thought the purpose of Master pages is to allow code behind references to
ContentPlaceHolders to set and/or obtain values in the reference pages? I
guess I don't see what benefit Master pages are doing for me?

Rob.

"Bruno Alexandre" <br*********@gmail.com> wrote in message
news:Ou**************@TK2MSFTNGP04.phx.gbl...
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:ContentPlaceHolder id="cph_Header" runat="server"
</asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="leftPane" runat="server"
</asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_LeftSideBar" runat="server"
</asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_Footer" runat="server"
</asp:ContentPlaceHolder>

</body>
</html>

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

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

<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
Runat="Server">
.. the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryContent"
ContentPlaceHolderID="cph_PrimaryContent" Runat="Server">
.. the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">
.. the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
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*****@pacbell.net> escreveu na mensagem
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header,
cph_LeftSideBar, cph_PrimaryContent, 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="Header.aspx.vb" Inherits="Header"
title="Header"...

...<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
Runat="Server">...

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

...<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
Runat="Server">...

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

...<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">...

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

...<asp:Content ID="c_PrimaryContent"
ContentPlaceHolderID="cph_PrimaryContent" 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*********@gmail.com> wrote in message
news:uJ**************@TK2MSFTNGP04.phx.gbl...
I forgot to tell you...

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

<asp:ContentPlaceHolder id="leftPane" runat="server" >
</asp:ContentPlaceHolder>

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="myLeftContent" ContentPlaceHolder="leftPane"
runat="server">

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

</asp:Content>


--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:%2****************@TK2MSFTNGP03.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 #11
ok... NOW I KNOW what confundes you...

MASTER PAGES is not FRAMESET!!!!

you do not click on a button and change only ONE part of the page!
you click on a button (or link) and you navigate to a new page

Download the code for Chapter 8 of the ASP.NET 2.0 Worx book and execute the
examples in your Developer program (Web Developer Express or Visual Studio
2005)
as I told you once... if you a have a footer that is qual to several pages,
you use master page, if you have a diferent design for all the pages you DO
NOT USE master pages

for example one of my websites www.filterqueen.dk I use one Master.Page with
all the design, above menu links, and left treeview, and ONE content place
holder for the inside of the interior palebrown pane....

can you understand??? if completly diferent from framesets, framesets are
diferent things, and you're free to use it asp.net 2.0, but none real
developer recomend it.
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:OG**************@TK2MSFTNGP02.phx.gbl...
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 ContentPlaceHolder (cph_PrimaryContent) 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 ContentPlaceHolder (cph_PrimaryContent) ? 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**************@TK2MSFTNGP04.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*****@pacbell.net> wrote in message
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header, cph_LeftSideBar,
cph_PrimaryContent, cph_Footer).



May 23 '06 #12
Exactly (I think) -- my thoughts exactly, seems to me there is no real
purpose to the Master page -- how can dynamic content be replaced in the
master page -- it can't from what I'm seeing? Can it? If so, someone
please show me how.

Seems to me, Master pages are VERY premitive templates that are not dynamic
at all. Can they do what framesets can do?

Rob.

"Demetri" <De*****@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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:ContentPlaceHolder id="cph_Header" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="leftPane" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_LeftSideBar" runat="server"
></asp:ContentPlaceHolder>

...
<asp:ContentPlaceHolder id="cph_Footer" runat="server"
></asp:ContentPlaceHolder>

</body>
</html>

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

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

<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
Runat="Server">
... the content to add the header will be here
</asp:Content>

<asp:Content ID="c_PrimaryContent"
ContentPlaceHolderID="cph_PrimaryContent"
Runat="Server">
... the content to add the Primary Content will be here
</asp:Content>

<asp:Content ID="c_LeftSideBar" ContentPlaceHolderID="cph_LeftSideBar"
Runat="Server">
... the content to add the Left Side Bar will be here
</asp:Content>

<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
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*****@pacbell.net> escreveu na mensagem
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header,
> cph_LeftSideBar, cph_PrimaryContent, 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="Header.aspx.vb" Inherits="Header"
> title="Header"...
>
> ...<asp:Content ID="c_Header" ContentPlaceHolderID="cph_Header"
> Runat="Server">...
>
> in Footer.aspx --
> ...@ Page Language="VB" MasterPageFile="~/Master.master"
> AutoEventWireup="false" CodeFile="Footer.aspx.vb" Inherits="Footer"
> title="Footer"...
>
> ...<asp:Content ID="c_Footer" ContentPlaceHolderID="cph_Footer"
> Runat="Server">...
>
> in LeftSideBar.aspx
> ...@ Page Language="VB" MasterPageFile="~/Master.master"
> AutoEventWireup="false" CodeFile="LeftSideBar.aspx.vb"
> Inherits="LeftSideBar" title="SideBar"...
>
> ...<asp:Content ID="c_LeftSideBar"
> ContentPlaceHolderID="cph_LeftSideBar"
> Runat="Server">...
>
> in PrimaryContent.aspx
> ...@ Page Language="VB" MasterPageFile="~/Master.master"
> AutoEventWireup="false" CodeFile="PrimaryContent.aspx.vb"
> Inherits="PrimaryContent" title="Content"...
>
> ...<asp:Content ID="c_PrimaryContent"
> ContentPlaceHolderID="cph_PrimaryContent" 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*********@gmail.com> wrote in message
> news:uJ**************@TK2MSFTNGP04.phx.gbl...
>>I forgot to tell you...
>>
>> in your Master.Page you need to have a minimum of ONE
>> ContentPlaceHolder,
>> like
>>
>> <asp:ContentPlaceHolder id="leftPane" runat="server" >
>> </asp:ContentPlaceHolder>
>>
>> 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="myLeftContent" ContentPlaceHolder="leftPane"
>> runat="server">
>>
>> ... your html / asp.net / javascript code :-)
>>
>> </asp:Content>
>>
>>
>>
>>
>> --
>>
>> Bruno Alexandre
>> (a Portuguese in Københanv, Danmark)
>>
>>
>> "Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
>> news:%2****************@TK2MSFTNGP03.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 #13
Ok, so after reading the pdf link, pg 76 clearly says "binding between
master and content pages is defined statically and cannot be changed or set
programmatically". So this means to me:

1. No easy way to migrate a frameset based web application -- in fact
migration is definitely NOT a good option
2. Every "content" page must be derived from the Master (or nested master)

No offense, but I'm going back to framesets as this "solution" is clearly
NOT going to make my life easier, in fact it will generate a ton of
migration work -- once again Microsoft missed the boat completely.

Don't know if I should laugh or cry.
"Mark Rae" <ma**@markN-O-S-P-A-M.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP04.phx.gbl...
"Demetri" <De*****@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.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 #14
framesets are the worst thing to do under web development...

in my website that I point to you, I have a tree menu in the left side and
that's in master.page, cause it's the same to all pages, even if I wanted
the menu to show other color when the user is in a menu page...

I'm only use ONE control for that!

by the way...

Master Pages DID NOT BEEN INVENTED to prevent developers using frames...

as I told you MASTER PAGES is not the same as FRAMESET's it's more like the
include files that we use to have in Classic ASP!

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:et**************@TK2MSFTNGP05.phx.gbl...
Ok, so after reading the pdf link, pg 76 clearly says "binding between
master and content pages is defined statically and cannot be changed or
set programmatically". So this means to me:

1. No easy way to migrate a frameset based web application -- in fact
migration is definitely NOT a good option
2. Every "content" page must be derived from the Master (or nested
master)

No offense, but I'm going back to framesets as this "solution" is clearly
NOT going to make my life easier, in fact it will generate a ton of
migration work -- once again Microsoft missed the boat completely.

Don't know if I should laugh or cry.
"Mark Rae" <ma**@markN-O-S-P-A-M.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP04.phx.gbl...
"Demetri" <De*****@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
So, how do you control the flow of each content controls and their
contents?


http://www.ftponline.com/books/chapters/0735620245.pdf


May 24 '06 #15
Bruno,

yeah, I finally got that now -- I've got it working and the big saving grace
is the Master. functionality that can be used in code behind for any content
page. I think documentation was severely lacking in just about every place
I looked and my WROX books just restated what MSDN states. I think the key
that was missed is that Master pages ARE templates, sure they have a tad
more functionality, but if more time were spent saying they are "templates"
then that would have triggered the concept much more clearly. It's like
they didn't want to use the word "template" because master pages offer a
little more than that.

I think it would also have been beneficial if the rendering process were
presented more clearly also -- content pages are NOT true web pages even
though they have the aspx extension -- this again was completely NOT
presented. Since the end result is something very similar to framesets, it
would also have been more informative if that point of view were used to
help the learning transition over to Master page concept -- saying "it is
very different" doesn't really help.

But as far as converting existing web applications -- I'm still debating
whether it is worth the effort. And I'm still not sure how to get Forms
authentication to work with this approach?? Not to mention how to get SSL
to work correctly for parts of my site rather than the entire site.

Rob.

"Bruno Alexandre" <br*********@gmail.com> wrote in message
news:eb*************@TK2MSFTNGP05.phx.gbl...
ok... NOW I KNOW what confundes you...

MASTER PAGES is not FRAMESET!!!!

you do not click on a button and change only ONE part of the page!
you click on a button (or link) and you navigate to a new page

Download the code for Chapter 8 of the ASP.NET 2.0 Worx book and execute
the examples in your Developer program (Web Developer Express or Visual
Studio 2005)
as I told you once... if you a have a footer that is qual to several
pages, you use master page, if you have a diferent design for all the
pages you DO NOT USE master pages

for example one of my websites www.filterqueen.dk I use one Master.Page
with all the design, above menu links, and left treeview, and ONE content
place holder for the inside of the interior palebrown pane....

can you understand??? if completly diferent from framesets, framesets are
diferent things, and you're free to use it asp.net 2.0, but none real
developer recomend it.
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:OG**************@TK2MSFTNGP02.phx.gbl...
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 ContentPlaceHolder (cph_PrimaryContent) 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 ContentPlaceHolder (cph_PrimaryContent) ? 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**************@TK2MSFTNGP04.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*****@pacbell.net> wrote in message
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header, cph_LeftSideBar,
cph_PrimaryContent, cph_Footer).



May 24 '06 #16
Hi Rob...

finally you got it :)

about the conversion, well... you knwo that you can have a master page that
is a content page also :)

page A = Master Page
page B = Content of A and Master Page A = result A + B
page C = Content of Master Page B = result A + B + C
page D = Content of Master Page A = result A + D

so, you can have a lot of master pages, 4 example:

1 for users, 1 for admins, 1 for secure website, etc...

as long as SSL, I worked with that and the only thing that I saw that was
diferent was the http changed to https, the rest is the same, developing for
http it's the same for https, only in https you knwo that all data is
encrypted in the client machine and decrypted where your server is...

--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:%2****************@TK2MSFTNGP04.phx.gbl...
Bruno,

yeah, I finally got that now -- I've got it working and the big saving
grace is the Master. functionality that can be used in code behind for any
content page. I think documentation was severely lacking in just about
every place I looked and my WROX books just restated what MSDN states. I
think the key that was missed is that Master pages ARE templates, sure
they have a tad more functionality, but if more time were spent saying
they are "templates" then that would have triggered the concept much more
clearly. It's like they didn't want to use the word "template" because
master pages offer a little more than that.

I think it would also have been beneficial if the rendering process were
presented more clearly also -- content pages are NOT true web pages even
though they have the aspx extension -- this again was completely NOT
presented. Since the end result is something very similar to framesets,
it would also have been more informative if that point of view were used
to help the learning transition over to Master page concept -- saying "it
is very different" doesn't really help.

But as far as converting existing web applications -- I'm still debating
whether it is worth the effort. And I'm still not sure how to get Forms
authentication to work with this approach?? Not to mention how to get SSL
to work correctly for parts of my site rather than the entire site.

Rob.

"Bruno Alexandre" <br*********@gmail.com> wrote in message
news:eb*************@TK2MSFTNGP05.phx.gbl...
ok... NOW I KNOW what confundes you...

MASTER PAGES is not FRAMESET!!!!

you do not click on a button and change only ONE part of the page!
you click on a button (or link) and you navigate to a new page

Download the code for Chapter 8 of the ASP.NET 2.0 Worx book and execute
the examples in your Developer program (Web Developer Express or Visual
Studio 2005)
as I told you once... if you a have a footer that is qual to several
pages, you use master page, if you have a diferent design for all the
pages you DO NOT USE master pages

for example one of my websites www.filterqueen.dk I use one Master.Page
with all the design, above menu links, and left treeview, and ONE content
place holder for the inside of the interior palebrown pane....

can you understand??? if completly diferent from framesets, framesets are
diferent things, and you're free to use it asp.net 2.0, but none real
developer recomend it.
--

Bruno Alexandre
(a Portuguese in Københanv, Danmark)
"Rob R. Ainscough" <ro*****@pacbell.net> escreveu na mensagem
news:OG**************@TK2MSFTNGP02.phx.gbl...
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 ContentPlaceHolder (cph_PrimaryContent) 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 ContentPlaceHolder (cph_PrimaryContent) ? 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**************@TK2MSFTNGP04.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*****@pacbell.net> wrote in message
news:O4**************@TK2MSFTNGP05.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 ContentPlaceHolder (IDs, cph_Header, cph_LeftSideBar,
> cph_PrimaryContent, cph_Footer).



May 24 '06 #17
Rob,

It appears what you want to make ASP.NET 2.0 do is not how it actually
works. I like to read those books but I also find some video and
screencasts to be really helpful. I have a subscription here...

http://www.learnvisualstudio.net/

It is nice being able to watch a video which actually shows you how it
works. You can also get free video here...

http://www.dnrtv.com/

Once you have a better understanding of Master Pages you may want to
get into Atlas as the new UpdatePanel. That is the new approach to
what you appear to want to do with Framesets.

Also, you can dynamically change the value for the Master Page but you
have to do it in the PreInit handler. I have used that feature quite a
bit.

--
Brennan Stehling
http://brennan.offwhite.net/blog/

May 25 '06 #18

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

Similar topics

5
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...
20
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...
7
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...
11
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.)...
4
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....
7
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. ...
7
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...
4
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:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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
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...

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.