Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

What is the best way to have custom css styles to theme a layout? -


let's have massive css file used style layout of application. now, want let users change colours of layout personalize it. best way customization, in terms of design , architecture? i'm looking solution pretty easy implement , isn't intrusive.

i don't want make whole css file templated on server if don't have to. i'd keep in /css file if it's possible, without server dependencies.

ideally, i'd override styles in default, don't think that's possible erase existing styles. means i'll have duplicate style information overwrite them... bad. duplication = bad.

i guess can assume there's server object related account has several properties various colours, backgrounds, menu tabs, link colours, hovered versions, etc.

public class theme {      private string headerbackground = "#172636";     private string displayname = "#ffffff";      private string tabbackground = "#284767";     private string tabtext = displayname;     private string hovertabbackground = tabbackground;     private string hovertabtext = tabtext;     private string selectedtabbackground = "#f5f5f5";     private string selectedtabtext = "#172636";      private string tableheaderbackground = headerbackground;     private string tableheadertext = displayname;     private string tablesubheaderbackground = tabbackground;     private string tablesubheadertext = displayname;     private string hovertablerowbackground = "#c0d2e4";      private string link = "#4e6c92"; 

my best guess serve entire css file , have mvc framework merge theme css text , serve out. best way? force browser never cache it?

my application using spring/hibernate, i'm pretty sure recommendations if don't use java/spring doable these technologies.

thanks help.

letting visitors/users customise & feel can rather fraught. need store properties in profile persist & feel across browser sessions.

in essence means serving custom css file render on demand. cache on client , use client-side js re-load file when/if change laf preferences.

one way link stylesheet this:

<link type="text/css" rel="stylesheet" href="sitestyles.css" /> <link type="text/css" rel="stylesheet"        href="customstylesheet.jsp?userid=123123123" /> 

you'd need stand-alone application listener loads profile , (probably) populates template file using string replacements (or whatever best). you'll need make sure response mime-type set "text/css". browser rest.

to force browser re-load css file, add guff, such version number, querystring:

<link type="text/css" rel="stylesheet"     href="customstylesheet.jsp?userid=123123123&vn=123" /> 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -