c# - How to apply customizable skins to an ASP.NET web site? -
i'm writing saas application web front end written in asp.net. i'm not of designer, , asp.net knowledge not yet @ expert level - focus on server side stuff - have basic master page , style sheets, trick.
now want offer customers ability customize web site own style sheets, colors, background pictures etc. customers log onto portal @ mycustomer.mydomain.com
, see skin "mycustomer" has chosen.
haven't faintest clue how this. how?
if allowing customer specify own css (either file or in textbox in page). can save .css file in virtual directory , during page_load
or page_init
event add page. need push link tag header of page
like this:
// define htmllink control. htmllink myhtmllink = new htmllink(); myhtmllink.href = "~/customerscustomstylesheet.css"; myhtmllink.attributes.add("rel", "stylesheet"); myhtmllink.attributes.add("type", "text/css"); // add htmllink head section of page. page.header.controls.add(myhtmllink);
Comments
Post a Comment