SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    asp.net styles-sheet switcher similar to dotnetnuke

    Hi All, I'm developing a site that requires the ability to render the layout and adjust the typography of the site. I've found many php version of styles sheet switchers as well as Js version but none on asp.net.

    Can anyone lead me in the right direction? i'm looking for something similar to what dotnetnuke has in the top right next to the search bar.

    Thanks in advance

  2. #2
    SitePoint Wizard
    Join Date
    Feb 2007
    Posts
    1,274
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go for ASP.NET themes and -master pages (read up on http://asp.net and http://msdn.microsoft.com).

    A quick rundown:

    Themes reside in "special" folders below the ~/App_Themes folder, e.g. /App_Themes/Blue and /App_Themes/Green.

    Themes can be configured in web.config for a site, but can also be set during the PreInit phase of a page processing. The latter is what you will want to tap into here.

    If a theme directory contains one or more css and/or js files, these files will be automagically included in every page once the theme is active.

    A theme directory can also contain skin files which may modify properties (themeable properties) of server-side controls. E.g. the "VisualImpaired" theme may use larger fonts due to its css stylesheet, but it may also change the number of rows per page in paging controls. Skins may also change the column sets, sort orders etc.

    Master pages defines a general layout for every page (called content pages). Master page may contain common elements. One master page may have an ads banner while another does not. One may have a login box, shopping cart etc.

    Master pages may also be set programatically during the PreInit phase of a page.

    What you will want to do is to develop a IHttpModule which can intercept requests to pages, hook into the PreInit event and set/override theme/masterpage per request.

    You will need to read up on Http modules as well, and how to enable them in web.config.

  3. #3
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks i'll look into it. Though its not exactly what i was looking for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •