HighTechTalks DotNet Forums  

MasterPage

ASP.net Web Controls microsoft.public.dotnet.framework.aspnet.webcontrols


Discuss MasterPage in the ASP.net Web Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Amilkar Calles
 
Posts: n/a

Default MasterPage - 05-19-2008 , 12:51 AM






Does anybody knows if exist any way to use a master page without
the "ContentPlaceHolderID" in the content page? (the default.aspx or
services.aspx for example)

What I want to do is load this aspx with the masterpage specified in the
webconfig

Thanks!


Reply With Quote
  #2  
Old   
Stan
 
Posts: n/a

Default Re: MasterPage - 05-19-2008 , 02:46 AM






On 19 May, 06:51, "Amilkar Calles" <amilkar.cal... (AT) gmail (DOT) com> wrote:
Quote:
Does anybody knows if exist any way to use a master page without
the "ContentPlaceHolderID" in the content page? (the default.aspx or
services.aspx for example)

What I want to do is load this aspx with the masterpage specified in the
webconfig

Thanks!
The MasterPage is specified in the @page directive of the content
pages not in web.config.

If you want to present the MasterPage as a viewable page on its own
then just leave the content placeholders empty in a designated content
page. Nothing is rendered in the content placeholder locations if they
are blank even though they appear in design view.


Reply With Quote
  #3  
Old   
Stan
 
Posts: n/a

Default Re: MasterPage - 05-19-2008 , 02:46 AM



On 19 May, 06:51, "Amilkar Calles" <amilkar.cal... (AT) gmail (DOT) com> wrote:
Quote:
Does anybody knows if exist any way to use a master page without
the "ContentPlaceHolderID" in the content page? (the default.aspx or
services.aspx for example)

What I want to do is load this aspx with the masterpage specified in the
webconfig

Thanks!
The MasterPage is specified in the @page directive of the content
pages not in web.config.

If you want to present the MasterPage as a viewable page on its own
then just leave the content placeholders empty in a designated content
page. Nothing is rendered in the content placeholder locations if they
are blank even though they appear in design view.


Reply With Quote
  #4  
Old   
Stan
 
Posts: n/a

Default Re: MasterPage - 05-19-2008 , 02:46 AM



On 19 May, 06:51, "Amilkar Calles" <amilkar.cal... (AT) gmail (DOT) com> wrote:
Quote:
Does anybody knows if exist any way to use a master page without
the "ContentPlaceHolderID" in the content page? (the default.aspx or
services.aspx for example)

What I want to do is load this aspx with the masterpage specified in the
webconfig

Thanks!
The MasterPage is specified in the @page directive of the content
pages not in web.config.

If you want to present the MasterPage as a viewable page on its own
then just leave the content placeholders empty in a designated content
page. Nothing is rendered in the content placeholder locations if they
are blank even though they appear in design view.


Reply With Quote
  #5  
Old   
Seth Williams
 
Posts: n/a

Default Re: MasterPage - 05-21-2008 , 02:11 PM



You can specifiy the Master page in the Web.config file with no problem
However, there is no way to get the page loaded without the
ContentPlaceholder
That's where the content of the individual pages is placed. Without the
ContentPlaceholder in each page, there is no content on each page.


David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


"Amilkar Calles" <amilkar.calles (AT) gmail (DOT) com> wrote

Quote:
Does anybody knows if exist any way to use a master page without
the "ContentPlaceHolderID" in the content page? (the default.aspx or
services.aspx for example)

What I want to do is load this aspx with the masterpage specified in the
webconfig

Thanks!




Reply With Quote
  #6  
Old   
Seth Williams
 
Posts: n/a

Default Re: MasterPage - 05-21-2008 , 02:11 PM



You can specifiy the Master page in the Web.config file with no problem
However, there is no way to get the page loaded without the
ContentPlaceholder
That's where the content of the individual pages is placed. Without the
ContentPlaceholder in each page, there is no content on each page.


David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


"Amilkar Calles" <amilkar.calles (AT) gmail (DOT) com> wrote

Quote:
Does anybody knows if exist any way to use a master page without
the "ContentPlaceHolderID" in the content page? (the default.aspx or
services.aspx for example)

What I want to do is load this aspx with the masterpage specified in the
webconfig

Thanks!




Reply With Quote
  #7  
Old   
Seth Williams
 
Posts: n/a

Default Re: MasterPage - 05-21-2008 , 02:11 PM



You can specifiy the Master page in the Web.config file with no problem
However, there is no way to get the page loaded without the
ContentPlaceholder
That's where the content of the individual pages is placed. Without the
ContentPlaceholder in each page, there is no content on each page.


David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


"Amilkar Calles" <amilkar.calles (AT) gmail (DOT) com> wrote

Quote:
Does anybody knows if exist any way to use a master page without
the "ContentPlaceHolderID" in the content page? (the default.aspx or
services.aspx for example)

What I want to do is load this aspx with the masterpage specified in the
webconfig

Thanks!




Reply With Quote
  #8  
Old   
Stan
 
Posts: n/a

Default Re: MasterPage - 05-30-2008 , 03:02 AM



Dear Seth, Amilkar

On 21 May, 20:11, "Seth Williams" <s... (AT) here (DOT) com> wrote:
Quote:
You can specifiy the Master page in the Web.config file with no problem
However, there is no way to get the page loaded without the
ContentPlaceholder
That's where the content of the individual pages is placed. Without the
ContentPlaceholder in each page, there is no content on each page.
Thank you Seth for pointing out my mistake about the option to specify
the master page file in web.config (it can be included as an attribute
in the <pages> tag). It may be a lack of experience (or imagination)
on my part but I cannot see any advantage in doing it that way and VS
2005 designer doesn't seem to support it.

It isn't quite true however that Content pages must have content place
holders in order for the page to be rendered. The rules are a bit more
complex than that and with good reason.

Master pages must have at least one content placeholder. That makes
sense otherwise it might as well be an ordinary page.

Content placeholders in Master pages can be non-empty. Anything placed
in them acts as default content for dependent pages.

Content placeholders in Content pages are optional. When they are
absent they are replaced with default content from the Master page. If
they are present then they overwrite any default content from the
Master page (which means that all default content is removed even if
the local placeholder is empty).

What this adds up to is that, conceivably, a Content page can have no
placeholders and will render the Master page with default content
only. It makes no sense however to have more than one Content page
like this.


Reply With Quote
  #9  
Old   
Stan
 
Posts: n/a

Default Re: MasterPage - 05-30-2008 , 03:02 AM



Dear Seth, Amilkar

On 21 May, 20:11, "Seth Williams" <s... (AT) here (DOT) com> wrote:
Quote:
You can specifiy the Master page in the Web.config file with no problem
However, there is no way to get the page loaded without the
ContentPlaceholder
That's where the content of the individual pages is placed. Without the
ContentPlaceholder in each page, there is no content on each page.
Thank you Seth for pointing out my mistake about the option to specify
the master page file in web.config (it can be included as an attribute
in the <pages> tag). It may be a lack of experience (or imagination)
on my part but I cannot see any advantage in doing it that way and VS
2005 designer doesn't seem to support it.

It isn't quite true however that Content pages must have content place
holders in order for the page to be rendered. The rules are a bit more
complex than that and with good reason.

Master pages must have at least one content placeholder. That makes
sense otherwise it might as well be an ordinary page.

Content placeholders in Master pages can be non-empty. Anything placed
in them acts as default content for dependent pages.

Content placeholders in Content pages are optional. When they are
absent they are replaced with default content from the Master page. If
they are present then they overwrite any default content from the
Master page (which means that all default content is removed even if
the local placeholder is empty).

What this adds up to is that, conceivably, a Content page can have no
placeholders and will render the Master page with default content
only. It makes no sense however to have more than one Content page
like this.


Reply With Quote
  #10  
Old   
Stan
 
Posts: n/a

Default Re: MasterPage - 05-30-2008 , 03:02 AM



Dear Seth, Amilkar

On 21 May, 20:11, "Seth Williams" <s... (AT) here (DOT) com> wrote:
Quote:
You can specifiy the Master page in the Web.config file with no problem
However, there is no way to get the page loaded without the
ContentPlaceholder
That's where the content of the individual pages is placed. Without the
ContentPlaceholder in each page, there is no content on each page.
Thank you Seth for pointing out my mistake about the option to specify
the master page file in web.config (it can be included as an attribute
in the <pages> tag). It may be a lack of experience (or imagination)
on my part but I cannot see any advantage in doing it that way and VS
2005 designer doesn't seem to support it.

It isn't quite true however that Content pages must have content place
holders in order for the page to be rendered. The rules are a bit more
complex than that and with good reason.

Master pages must have at least one content placeholder. That makes
sense otherwise it might as well be an ordinary page.

Content placeholders in Master pages can be non-empty. Anything placed
in them acts as default content for dependent pages.

Content placeholders in Content pages are optional. When they are
absent they are replaced with default content from the Master page. If
they are present then they overwrite any default content from the
Master page (which means that all default content is removed even if
the local placeholder is empty).

What this adds up to is that, conceivably, a Content page can have no
placeholders and will render the Master page with default content
only. It makes no sense however to have more than one Content page
like this.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.