CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    best moment of applying dynamic template?

    Hi there,

    I have for my website 2 domains. For both domains I have a different stylesheet. What is the best moment of applying this on the fly. By 'moment' I mean the page's 'PreInit', 'Init', 'PreLoad' or 'Load' event of the page's life cycle.

  2. #2
    Join Date
    Oct 2008
    Posts
    47

    Re: best moment of applying dynamic template?

    All you need to do is link the style sheet in your HTML header.... in your case this would be the best since you have style sheets already designed as sperate files...

    <link rel="stylesheet" type="text/css" href="YOUR STYLE SHEET LOCATION and FILENAME HERE" />

    or you can dut your styles inline also in the head of the HTML document...

    <style>
    YOUR CSS HERE
    </style>

    Although this method is depreciating with the evolution of web applications

    Hope this helps

    Larry Darrah
    MS Architect Evangelist

  3. #3
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: best moment of applying dynamic template?

    Sorry for my late reply, I was on a holiday.

    But I mean that I need to check from which domain the user is entering the page, and then apply the stylesheet.
    For example, when the user is entering the page via 'www.mydomain1.com', I need to use stylesheet 'style1.css', if the user is entering the page via 'www.mydomaim2.com', I need to use 'stylesheet2.css'.

    I hope I make myself clear.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured