Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Applying different themes to same page or Applying different styles to same page

Applying different themes to same page or Applying different styles to same page

Scheduled Pinned Locked Moved ASP.NET
csswpf
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jophinmichael
    wrote on last edited by
    #1

    Hi, I need to change my web application in such a way that , I need to apply different styles(different css files,different images) for the same pages for different users.So when different users sign in they will see the same pages in different colors .Is it possible Regards Jophin

    jophin

    A B 2 Replies Last reply
    0
    • J jophinmichael

      Hi, I need to change my web application in such a way that , I need to apply different styles(different css files,different images) for the same pages for different users.So when different users sign in they will see the same pages in different colors .Is it possible Regards Jophin

      jophin

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      I can suggest you two different you implement. 1) ASP.NET Profiles : ASP.NET having inbuilt features to implement it. Please read this article 2) Data Base : Store user choice theme in the database and retreive the data (Theme/css name) from DB while user login an apply it. Update database if user change the reference. Hope this will help you :)

      cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

      J 1 Reply Last reply
      0
      • J jophinmichael

        Hi, I need to change my web application in such a way that , I need to apply different styles(different css files,different images) for the same pages for different users.So when different users sign in they will see the same pages in different colors .Is it possible Regards Jophin

        jophin

        B Offline
        B Offline
        Brij
        wrote on last edited by
        #3

        It is very much possible.Use asp.net Theme for detail Have a look Save the theme as per user basis in the database and when loading the application read it from database and load the theme accordingly.

        Cheers!! Brij Check My Latest Article

        J 1 Reply Last reply
        0
        • A Abhijit Jana

          I can suggest you two different you implement. 1) ASP.NET Profiles : ASP.NET having inbuilt features to implement it. Please read this article 2) Data Base : Store user choice theme in the database and retreive the data (Theme/css name) from DB while user login an apply it. Update database if user change the reference. Hope this will help you :)

          cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

          J Offline
          J Offline
          jophinmichael
          wrote on last edited by
          #4

          Thank you Abhijeet, Let me have a try. Regards Jophin

          jophin

          1 Reply Last reply
          0
          • B Brij

            It is very much possible.Use asp.net Theme for detail Have a look Save the theme as per user basis in the database and when loading the application read it from database and load the theme accordingly.

            Cheers!! Brij Check My Latest Article

            J Offline
            J Offline
            jophinmichael
            wrote on last edited by
            #5

            Thank you very much Brij, I tried this and it works .But still I am having another issue, there are palces in which images are loading from client side. Because of this I am having two problems. 1. They are not getting loaded because the previous location of images folder is changed are changed. 2. How I can make these images also dynamic according to the theme applied Thanks in Advance Jophin

            jophin

            A B 2 Replies Last reply
            0
            • J jophinmichael

              Thank you very much Brij, I tried this and it works .But still I am having another issue, there are palces in which images are loading from client side. Because of this I am having two problems. 1. They are not getting loaded because the previous location of images folder is changed are changed. 2. How I can make these images also dynamic according to the theme applied Thanks in Advance Jophin

              jophin

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              jophinmichael wrote:

              Because of this I am having two problems. 1. They are not getting loaded because the previous location of images folder is changed are changed. 2. How I can make these images also dynamic according to the theme applied

              AS you are applying theme Dynamically, it means you are applying either Theme or css to the pages. Create Different CSS which having the different images. So that will resolved your problem. One more thing try to apply your theme in Page_PreInit() event :) Hope this will help you .

              cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

              J 1 Reply Last reply
              0
              • J jophinmichael

                Thank you very much Brij, I tried this and it works .But still I am having another issue, there are palces in which images are loading from client side. Because of this I am having two problems. 1. They are not getting loaded because the previous location of images folder is changed are changed. 2. How I can make these images also dynamic according to the theme applied Thanks in Advance Jophin

                jophin

                B Offline
                B Offline
                Brij
                wrote on last edited by
                #7

                Do as Abhijit says,it'll resolve your problem.Use different css files according to theme and aplly them according the theme

                Cheers!! Brij Check My Latest Article

                1 Reply Last reply
                0
                • A Abhijit Jana

                  jophinmichael wrote:

                  Because of this I am having two problems. 1. They are not getting loaded because the previous location of images folder is changed are changed. 2. How I can make these images also dynamic according to the theme applied

                  AS you are applying theme Dynamically, it means you are applying either Theme or css to the pages. Create Different CSS which having the different images. So that will resolved your problem. One more thing try to apply your theme in Page_PreInit() event :) Hope this will help you .

                  cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

                  J Offline
                  J Offline
                  jophinmichael
                  wrote on last edited by
                  #8

                  Hi Abhijit, Sorry for this late reply.I think I did not explained my problem properly. I tried app themes and it is working fine for me.So I am able to apply different themes according to the users who are signing in.But In my aspx pages there are some html images like the following close. But I wanted to load different images according to the theme which is getting applied. So now I am planning to do something like the following for my green theme and for my red theme and in the class I will provide the src for the image . I am not sure whether this is the proper way of doing it. So if this is not the right way can you suggest me a better way. Regards Jophin

                  jophin

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups