Access Web.config file usign System.xml

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jobikjohn
    New Member
    • Jan 2008
    • 2

    Access Web.config file usign System.xml

    Hi,

    How can I access each and every node and its attribute values in the custom section part of the web.config file?

    Pls feel free to share your ideas.

    Regards,
    Jobi
  • leoiser
    New Member
    • Jul 2007
    • 41

    #2
    Hi jobi,

    using System.Collecti ons.Specialized ;

    NameValueCollec tion config = (NameValueColle ction)System.Co nfiguration.Con figurationSetti ngs.GetConfig(" MYTAG/SUBTAG");

    string sAvailableColor = config["MYColor"];

    here MYTAG is the Group section SUBTAG custom section.
    MYColor is the key name

    Happy programming.. :)



    Originally posted by jobikjohn
    Hi,

    How can I access each and every node and its attribute values in the custom section part of the web.config file?

    Pls feel free to share your ideas.

    Regards,
    Jobi

    Comment

    Working...