Wrox Programmer Forums
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 13th, 2010, 04:55 PM
Registered User
Join Date: Jun 2009
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default How can i implement user preference themes?

In the asp.net 2 version of the 'beerhouse project', a user was able to select a colour preference, which was stored in a session variable, which was in turn, stored in a custom user profile control. The Page class inherited a base class that used this information to determine which App_theme folder to select the appropriate css colours for the site.
I’m aware that the mvc does away with viewstate data (which is great!) and that the page life cycle is inherently different.
I am developing a site for disabled users and had previously used the thebeerhouse asp.2.0 as a template, but now wish to completely re-develop the site using thebeerhouse mvc model.
I am thrilled by the amount of control given to the rendered html markup using the .mvc model (the web forms server controls rendered output that created serious problems for screen reader users), but desperately need to retain the ability for users who are colour blind to be able to change the colour contrast of the site.
Can you suggest the best way I could go about implementing a colour picker in the .mvc framework?
Old November 14th, 2010, 01:01 AM
Lee Dumond's Avatar
Wrox Author
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts

The Beerhouse webforms project used ASP.NET Themes to implement this.

In MVC, the the best way would be to build a "high contrast" alternate stylesheet using CSS, then implement a CSS switcher for your alternate style sheets. Do a Google search for "CSS switcher" and you'll find a ton of good leads. There are switchers that require a form post, as well as those that switch using JavaScript/jQuery.
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

if (this.PostHelpedYou)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Applying the User-Selected Themes JohnB BOOK: Beginning ASP.NET 4 : in C# and VB 6 December 8th, 2010 11:55 AM
How to implement 'Log in as another user' feature in asp.net windows authentication? naush83 BOOK: Professional ASP.NET 3.5 Security, Membership, and Role Management ISBN: 978-0-470-37930-1 0 October 19th, 2009 05:16 AM
Use Themes? the.pi.man ASP.NET 2.0 Basics 2 March 7th, 2007 08:44 AM
Themes bmains ASP.NET 2.0 Basics 2 August 2nd, 2004 08:48 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.