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
  1. Home
  2. Web Development
  3. ASP.NET
  4. i am losing all my styles .. help

i am losing all my styles .. help

Scheduled Pinned Locked Moved ASP.NET
helpquestioncsswpf
9 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.
  • K Offline
    K Offline
    Kleindahl
    wrote on last edited by
    #1

    Hi, my problem is this: In this cms that i have created, the administrator has an admin zone where he/she can alter setting for the given homepage. One function that i am working on is the ability to make the site eather public or private to the public. It is meant to be used before publishing the site to the public, so that the administrator can create all the content for the website and then afterwards make it public for any interested viewers. I alter the web.config bye code, inserting and deleting and respectively. The bug i get is than every second time i do so, i lose all css styles in the administration! my question to you is: How can this be?? -- Christian

    N S 2 Replies Last reply
    0
    • K Kleindahl

      Hi, my problem is this: In this cms that i have created, the administrator has an admin zone where he/she can alter setting for the given homepage. One function that i am working on is the ability to make the site eather public or private to the public. It is meant to be used before publishing the site to the public, so that the administrator can create all the content for the website and then afterwards make it public for any interested viewers. I alter the web.config bye code, inserting and deleting and respectively. The bug i get is than every second time i do so, i lose all css styles in the administration! my question to you is: How can this be?? -- Christian

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Kleindahl wrote:

      I alter the web.config bye code, inserting and deleting

      Are you altering web.config at runtime ? Altering web.config at runtime will restart the application domain. That might be making problem. For doing such things, it's better to have one separate XML configuration file.

      Kleindahl wrote:

      The bug i get is than every second time i do so, i lose all css styles in the administration!

      Well, provided scenario don't have any relation with styles. How you are referring the style sheets ?


      My Website | Ask smart questions

      K 1 Reply Last reply
      0
      • K Kleindahl

        Hi, my problem is this: In this cms that i have created, the administrator has an admin zone where he/she can alter setting for the given homepage. One function that i am working on is the ability to make the site eather public or private to the public. It is meant to be used before publishing the site to the public, so that the administrator can create all the content for the website and then afterwards make it public for any interested viewers. I alter the web.config bye code, inserting and deleting and respectively. The bug i get is than every second time i do so, i lose all css styles in the administration! my question to you is: How can this be?? -- Christian

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        Try to use XML instead of altering the web.config file at runtime. And check whether your stlyesheets coding are closed while executing the application or building the application.

        SSK. Anyone who says sunshine brings happiness has never danced in the rain.

        K 1 Reply Last reply
        0
        • N N a v a n e e t h

          Kleindahl wrote:

          I alter the web.config bye code, inserting and deleting

          Are you altering web.config at runtime ? Altering web.config at runtime will restart the application domain. That might be making problem. For doing such things, it's better to have one separate XML configuration file.

          Kleindahl wrote:

          The bug i get is than every second time i do so, i lose all css styles in the administration!

          Well, provided scenario don't have any relation with styles. How you are referring the style sheets ?


          My Website | Ask smart questions

          K Offline
          K Offline
          Kleindahl
          wrote on last edited by
          #4

          hi Navaneeth, first of, thank you for trying to help me out. I know that altering the web.config file will reset the application, but i figured that in this scenario where an administrator would most likely use it to make the site public the first time, it would not madder because outside users whould not be able to see the site yet, and therefore not be logged in. having one separate XML configuration file By this do you mean one more web.config file or just an simpler xml file that i use as a config file To how i refer to the stylesheets: I use themes so i have my admin styles in a theme folder and reference it in my default side (i am using masterpages) hoping that you can help me out :) -- Christian

          N 1 Reply Last reply
          0
          • S Sathesh Sakthivel

            Try to use XML instead of altering the web.config file at runtime. And check whether your stlyesheets coding are closed while executing the application or building the application.

            SSK. Anyone who says sunshine brings happiness has never danced in the rain.

            K Offline
            K Offline
            Kleindahl
            wrote on last edited by
            #5

            hi, thank you for trying to help out. to the And check whether your stylesheets coding are closed while executing the application or building the application. i don't see how it should be possible for the styles to change in any way doing execution of the application? Or by closed did you mean something else? Like finished loading? -- Christian

            1 Reply Last reply
            0
            • K Kleindahl

              hi Navaneeth, first of, thank you for trying to help me out. I know that altering the web.config file will reset the application, but i figured that in this scenario where an administrator would most likely use it to make the site public the first time, it would not madder because outside users whould not be able to see the site yet, and therefore not be logged in. having one separate XML configuration file By this do you mean one more web.config file or just an simpler xml file that i use as a config file To how i refer to the stylesheets: I use themes so i have my admin styles in a theme folder and reference it in my default side (i am using masterpages) hoping that you can help me out :) -- Christian

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              Kleindahl wrote:

              By this do you mean one more web.config file or just an simpler xml file that i use as a config file

              I mean a separate XML file, and keep the settings needed for site in this

              Kleindahl wrote:

              I use themes so i have my admin styles in a theme folder and reference it in my default side (i am using masterpages)

              Sorry, I don't have much idea on using themes. Try changing the settings to other XML file and stop updating web.config at runtime. That may solve the issue. Not sure :~


              My Website | Ask smart questions

              K 1 Reply Last reply
              0
              • N N a v a n e e t h

                Kleindahl wrote:

                By this do you mean one more web.config file or just an simpler xml file that i use as a config file

                I mean a separate XML file, and keep the settings needed for site in this

                Kleindahl wrote:

                I use themes so i have my admin styles in a theme folder and reference it in my default side (i am using masterpages)

                Sorry, I don't have much idea on using themes. Try changing the settings to other XML file and stop updating web.config at runtime. That may solve the issue. Not sure :~


                My Website | Ask smart questions

                K Offline
                K Offline
                Kleindahl
                wrote on last edited by
                #7

                N a v a n e e t h wrote:

                I mean a separate XML file

                Okay, i am gonna try it out as soon as i have the time. Thank you very much for trying to help me out. But one thing that i do not understand is this: if updating the config file doing runtime is so bad ( i have hearded it many times asking questions that i should not do so ), why does microsoft ship the framework with classes for making speciel config sections for programmers to use? I thought that one smart thing would be that we programmers could store app settings and change then when needed? -- Christian

                N 1 Reply Last reply
                0
                • K Kleindahl

                  N a v a n e e t h wrote:

                  I mean a separate XML file

                  Okay, i am gonna try it out as soon as i have the time. Thank you very much for trying to help me out. But one thing that i do not understand is this: if updating the config file doing runtime is so bad ( i have hearded it many times asking questions that i should not do so ), why does microsoft ship the framework with classes for making speciel config sections for programmers to use? I thought that one smart thing would be that we programmers could store app settings and change then when needed? -- Christian

                  N Offline
                  N Offline
                  N a v a n e e t h
                  wrote on last edited by
                  #8

                  Kleindahl wrote:

                  why does microsoft ship the framework with classes for making speciel config sections for programmers to use?

                  Configuration section varies for each project or for each programmer. I will be following one method and you will be following the other. So it's tough to make a common config file. But .NET framework ships with powerful XML manipulation classes. You can make use of those and manipulate with custom settings file. .NET allows us to write a XML serializable class. So using this a XML file can easily be read. Security will be a main issue when you use custom XML configuration files, because it can be accessible via URL. So either you have to use .config extension or add the XML extension to HttpForbiddenHandler to secure it. Hope this helps


                  My Website | Ask smart questions

                  K 1 Reply Last reply
                  0
                  • N N a v a n e e t h

                    Kleindahl wrote:

                    why does microsoft ship the framework with classes for making speciel config sections for programmers to use?

                    Configuration section varies for each project or for each programmer. I will be following one method and you will be following the other. So it's tough to make a common config file. But .NET framework ships with powerful XML manipulation classes. You can make use of those and manipulate with custom settings file. .NET allows us to write a XML serializable class. So using this a XML file can easily be read. Security will be a main issue when you use custom XML configuration files, because it can be accessible via URL. So either you have to use .config extension or add the XML extension to HttpForbiddenHandler to secure it. Hope this helps


                    My Website | Ask smart questions

                    K Offline
                    K Offline
                    Kleindahl
                    wrote on last edited by
                    #9

                    i had not thought about the security issue of using a xml file, so thanks alot for bringing it to my attention. I have changed the file extention to .config now -- Christian

                    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