Last post May 01, 2007 07:13 PM by rstepan
May 01, 2007 05:36 PM|freedom1029|LINK
I am new to Master Page so sorry if this question might have been answered before. My master page contains a link to my stylesheet.
However the cssclass do not get applied on my gridview located in a Content Page, why is that and what should I do to work around this?
May 01, 2007 06:15 PM|rstepan|LINK
In the application's Web.config file, set the
<pages> element to the name of the theme, either a global theme or a page theme, as shown in the following example:
May 01, 2007 06:22 PM|freedom1029|LINK
Thanks for your reply but I am still very confuse.
So I have no other choices than to work with themes? Why is my regular style sheet set in my master page not available in my content pages?
May 01, 2007 06:40 PM|rstepan|LINK
Setting a theme at the Web site level applies styles (style sheet 'css' files) and skins ('skin' files) to all the pages and controls in the site. When you developed your Master Page you gave it a style sheet. To have that style sheet have precedence over
the other pages CSS properties you must tell your site (by setting Pages property in your Config file) to default to that style sheet also.
Your master page gives you a common wrapper around your other pages, it does not control the look and feel of those pages.
theme masterpage change PreInit
May 01, 2007 07:13 PM|rstepan|LINK
You cannot directly apply an ASP.NET theme to a master page. If you add a theme attribute to the
@ Master directive, the page will raise an error when it runs.
However, themes are applied to master pages under these circumstances:
If a theme is defined in the content page. Master pages are resolved in the context of content pages, so the content page's theme is applied to the master page as well.
If the site as a whole is configured to use a theme by including a theme definition in the pages element.
Master pages, being just another control inside a page, do not have a separate theme applied. Master pages use the theme specified by the page that is using them.