Skip to main content

Theming in Whidbey using CSS

Continuing my blog titled Themes in Whidbey. I would like to mention some great points I did find out today about Whidbey featrures.
How many times have you got sick of developing Sites which have themes????
I mean every page u create has to have, maybe in ASP, something like
<link href="<%=Session["ThemeFile"]%>.css"/>
I have been doing since a long time. Do mention if you have a simpler method of defining a variable CSS for your page!!! Whidbey simplifies this further. Now in ASP.NET, all you will have to do is

  • Create Themes directory, if not aldready present,

  • Create a directory for each theme required, maybe Black, Gray,etc.
    Dump your CSS files into this directory.

  • in Page_PreInit method define the Theme as Page.Theme="<Theme directory Name>". Further can be made into Page.Theme=(string)Session["ThemeType"]


and viola, your theme management is take care by ASP.NET
When you want to change the theme, the string to be passed to the Theme property should be changed. Is'nt that great.

But beware of using the skinId property for any controls. The complexities were aldready mentioned in the other blog.
Anwyay go ahead and play around. Until the next time, happy theming!!!

Comments

Popular posts from this blog

News Feature

Enough of idle minds' posts. Instead got down to the engines of coding and coded the "Top News Stories", available on the right :D, on the side bar. Initially on load of the page, i was planning to show all the current top stories, accessing it from other sites. But, IE seems to have some security restrictions on a web page accessing resources of other web sites. Ok, i think that's what it is. So it pops up some security message. So i have shifted over to using a textbox and a "Go" button. On the click of the "Go" all the news as per the xml feed in the text box will be displayed. Go ahead and try it, but remember to click "Yes" on the security warning. Anyway for the knowledgeable. On click of the "Go!!!" it uses XmlHttpRequest , retrieves the XML feed from the site mentioned in the text box and displays it in "user friendly" format.

The fight is in the open

Been busy lately and so have not managed to post for quite long. But I just had to post this. This post is dedicated to all persons who dont know anything about the fight between MS and Google: Check out the links starting from: http://news.zdnet.com/2100-9588_22-5875433.html?tag=nl.e589 There are more links as you get thru the article. Be sure to read those too. And just as a side-note: Check out " Atlas ". These are client side and server side components, which easily (??) enable you to make Web calls. This is done by encapsulating AJAX. (please dont insult by telling me that you dont know what that is).

Movies common for 2 actors/actresses

One question: Which all movies did both George Clooney and Brad Pitt act in? Am sure you would be going to google. And what do you do after that? See all the links, and check each and every page, trying to find the common movies. Now why could the computer not do this? Why are you spending 5 minutes trying to find this out, when you should be able to request the computer to do this..... Enter Semantic search, a mechanism where you can query data for relationships which the human mind understands, and secondly the computer understands. There are many places where they are trying to build this semantic search. I build a small application which uses freebase . And built an application where you can provide the names of 2 actors/actresses and find the movies both worked on. Check the page http://www.nlighten.in/CommonMovies.html . Details about freebase: Freebase uses the databases provided by Wikipedia and multiple other providers, and provide all the data in OOP ...