Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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?
Thanks
  #2 (permalink)  
Old November 14th, 2010, 01:01 AM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

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

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.