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. General Programming
  3. C#
  4. custom sections in .config files

custom sections in .config files

Scheduled Pinned Locked Moved C#
winformsxmlquestion
5 Posts 2 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    I have a Windows Forms application that requires to read an XML, i know you can put something like but in the case the value is XML what can I do? i tried to put the xml inside the value but it didnt work i had to do it this way that worked, but it would be too hard for the user to edit and not make mistakes when the XML grows, so i was wondering if there is any way I could just put my xml tags somewhere in the .config file where it doesn't make the application crash something like this blah I basically want to avoid that some settings are stored in the .config file and others in a different XML file Thanks in advance

    A 1 Reply Last reply
    0
    • A Anonymous

      I have a Windows Forms application that requires to read an XML, i know you can put something like but in the case the value is XML what can I do? i tried to put the xml inside the value but it didnt work i had to do it this way that worked, but it would be too hard for the user to edit and not make mistakes when the XML grows, so i was wondering if there is any way I could just put my xml tags somewhere in the .config file where it doesn't make the application crash something like this blah I basically want to avoid that some settings are stored in the .config file and others in a different XML file Thanks in advance

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      I have a Windows Forms application that requires to read an XML, i know you can put something like < add key="serverPath" value="http://localhost/something.aspx" / > but in the case the value is XML what can I do? i tried to put the xml inside the value but it didnt work < add key="test" value="< hi >" / > i had to do it this way < add key="test" value="<hi>" / > that worked, but it would be too hard for the user to edit and not make mistakes when the XML grows, so i was wondering if there is any way I could just put my xml tags somewhere in the .config file where it doesn't make the application crash something like this < configuration > < appSettings > < add key="serverPath" value="http://localhost" / > < /appSettings > < myTag > < moreTags > blah < /moreTags > < /myTag > < /configuration > I basically want to avoid that some settings are stored in the .config file and others in a different XML file Thanks in advance

      A T 2 Replies Last reply
      0
      • A Anonymous

        I have a Windows Forms application that requires to read an XML, i know you can put something like < add key="serverPath" value="http://localhost/something.aspx" / > but in the case the value is XML what can I do? i tried to put the xml inside the value but it didnt work < add key="test" value="< hi >" / > i had to do it this way < add key="test" value="<hi>" / > that worked, but it would be too hard for the user to edit and not make mistakes when the XML grows, so i was wondering if there is any way I could just put my xml tags somewhere in the .config file where it doesn't make the application crash something like this < configuration > < appSettings > < add key="serverPath" value="http://localhost" / > < /appSettings > < myTag > < moreTags > blah < /moreTags > < /myTag > < /configuration > I basically want to avoid that some settings are stored in the .config file and others in a different XML file Thanks in advance

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        this is getting complicated to post when i wrote "i had to do it this way" and the sentence looks identical i wrote & lt; hi & gt; the question at the end is can i add my own tags to the .config file? Thanks

        T 1 Reply Last reply
        0
        • A Anonymous

          this is getting complicated to post when i wrote "i had to do it this way" and the sentence looks identical i wrote & lt; hi & gt; the question at the end is can i add my own tags to the .config file? Thanks

          T Offline
          T Offline
          The Limey
          wrote on last edited by
          #4

          Damn the board did it to me too.

          Reading your custom section GetConfig("customsettings")("x") Hope this helps He who laughs last thinks slowest.

          1 Reply Last reply
          0
          • A Anonymous

            I have a Windows Forms application that requires to read an XML, i know you can put something like < add key="serverPath" value="http://localhost/something.aspx" / > but in the case the value is XML what can I do? i tried to put the xml inside the value but it didnt work < add key="test" value="< hi >" / > i had to do it this way < add key="test" value="<hi>" / > that worked, but it would be too hard for the user to edit and not make mistakes when the XML grows, so i was wondering if there is any way I could just put my xml tags somewhere in the .config file where it doesn't make the application crash something like this < configuration > < appSettings > < add key="serverPath" value="http://localhost" / > < /appSettings > < myTag > < moreTags > blah < /moreTags > < /myTag > < /configuration > I basically want to avoid that some settings are stored in the .config file and others in a different XML file Thanks in advance

            T Offline
            T Offline
            The Limey
            wrote on last edited by
            #5

            Damn the board did it to me too.

            Reading your custom section GetConfig("customsettings")("x") He who laughs last thinks slowest.

            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