.NET - Written by typemismatch on Monday, October 29, 2007 22:44 - 0 Comments
VS 2005 Style Sheet Tip
Some of you may already know this little asp.net secret but if you don’t enjoy :)
It appears that when an asp.net page renders due to the fact that the header element is actually being generated on the server before it is sent to the client some nifty things happen. I hope you already know that any style sheets placed in a theme folder will get added to the header automatically. This is really great but what if you want a style to be conditional?
Well, normally you’d put the css into another folder so it isn’t automatically added - for example you might use /css/ie_hacks.css or something like that. In the header you’d probably specify the css source as /css/ie_hacks.css but you can take a short cut. You can just use the style sheet name, ie_hacks.css and when the page is rendered the full path will be found.
I use this a lot with conditional IE hacks where I want a path rendered that I do not know during development since many of my site projects run mutiple clients under one site.
-c
Most Popular Content
- Setting up a Windows image in Amazon’s EC2
- Amazon goes live with Windows in the Cloud
- Silverlight Tip - Initialize!
- Silverlight Tip - Grid layouts
- Selecting a single LINQ2SQL Entity
- What kind of error handling is this?
- Silverlight and Google searches
- Goodbye iPhone 3G
- Gadget Features!
- iPhone Battery Tip
- Oh come on Microsoft ….
Software - Oct 20, 2008 21:04 - 0 Comments
Silverlight Tip - Initialize!
More In Software
- Silverlight Tip - Grid layouts
- Selecting a single LINQ2SQL Entity
- Silverlight and Google searches
- Gadget Features!
- Oh come on Microsoft ….





Leave a Reply