473,394 Members | 1,769 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,394 software developers and data experts.

ASP.NET 2.0 Themes, CSS and Master Pages Questison

I have just started playing around with ASP.NET 2.0 and have a few questions
I couldn't get answers to on the net.

If anyone could help me with these it'd be awesome.
---
Themes - THey seem to lack full functionality with CSS files.

I have a theme set up. Inside that theme I can have 32 CSS files. Each file
is for each page within that theme. Why? I find it easier having multiple
small CSS files to work with rather than a few HUGE ones. It seems to me
that every content page will incorporate every CSS file in that theme.

Sure i can work with it seeing you shouldn't be referencing controls by ID
(which is another issue below... but I think I know why), but it's still
bad. If I have:

<div class="header"></div> on one page and on another i have the same, I
might want them different on each page, but with the way the styles are
loaded, I can't have .header {...} defined in multiple CSS files under the
same theme.

Now if there is a way to do this, I'd love to learn how :D.
---
Content Pages - Master Pages.

I think I know why it does this... but I might be off base.

..NET will change the ID's given to controls within a master page. Now, this
is sort of understandable because in my mind .NET will treat each content
page as a seperate control / object. A master page might have multiple
content pages rendered in it at once, so it'd need to change ID's to make
sure they're unique.

understandable.... but why would it need to change ID's in the base master
page? I find it difficult when I want to reference controls by ID's in CSS
files only to have their ID's changed.
Any help with these would be awesome. I spent a long time trying to find
answers with google / forums but no one really knows...

Thanks.
Dec 1 '05 #1
1 1515
On Thu, 1 Dec 2005 09:05:11 -0800, "Ryan Ternier"
<rt******@icompasstech.com> wrote:

<div class="header"></div> on one page and on another i have the same, I
might want them different on each page, but with the way the styles are
loaded, I can't have .header {...} defined in multiple CSS files under the
same theme.

So, you have a stylesheet per page. Do you still use multiple themes?
If you have two theme directories do you create another 32 style
sheets?

I'm thinking themes may not be what you want to use at all. Themes are
about providing a consistent UI across multiple pages. If you want a
different look for each page in an application, I don't think themes
will help - you'll be swimming upstream.

understandable.... but why would it need to change ID's in the base master
page? I find it difficult when I want to reference controls by ID's in CSS
files only to have their ID's changed.


I'd be very, very reluctant to reference an ASP.NET control by ID in
CSS. If you make some changes to the page the ID can change and the UI
is broken. I'd stick to using a class name.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Dec 2 '05 #2

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

Similar topics

1
by: Seefor | last post by:
I may be missing something, but why aren't master pages part of themes? i.e. why don't they go in the App_Themes or global Themes directory, and be referenced just by name (not full path) in the...
3
by: johannblake | last post by:
I'm reading up on Themes and Master Pages in ASP.NET 2.0 but I cannot seem to understand what the difference between the two are. Do Master Pages essentially end up doing what Themes do? Is...
1
by: sbelgrave | last post by:
First off. Hats off to MS to really doing a good job of major fixes on VS 2K5. It is really a lot better. I have begun using Master Pages with Themes but am a bit confused as to how to make the...
2
by: suresh.csharp | last post by:
Hi, I have created two themes in our application. Trying to apply themes on fly to the entire application(all pages..) . 1. In web.config file mentioned <pages theme="theme1" />, It is applying...
4
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu...
0
by: xkeops | last post by:
I have a C# web app ... just playing around with master pages, themes and skins. I have read Scott's article: http://odetocode.com/Blogs/scott/archive/2005/12/09/2604.aspx Still not really...
11
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand...
2
by: mike | last post by:
Hi. I am having trouble grasping the concept of applying a consistent theme to an ASP.net website. I didn't used to like ASP because it was too hard to apply a theme from a common theme folder like...
8
by: Jonathan Wood | last post by:
I want to dynamically set my site's theme based on a setting stored in my database. I just hooked this up but get an error that the theme can only be set in the page's PreInit event or earlier....
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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...

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.