There was a discussion on this recently on either vbdotnet or the other
develop.com's dotnet lists. The sum of it all is you have to read/write the
xml config file no matter where it is, although there are config file class
people have written. You can also disassemble the system.configuration to
see what it does (loads up xml file, so nothing new there) and use that
functionality and include a save on the xmldocument. There is no other built
in method for doing this automatically. This is of course considering you
don't use the other methods Merak mentioned which are excellent choices.
Adam


-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Clark, Michael
(OFM)
Sent: Friday, October 15, 2004 6:44 PM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] How to Programmatically Maintain .config files?

I've been looking to see how I would go about maintaining a .config file
using some functionality of the System.Configuration class, but all it seems
to be able to do is read the web.config or app.config files and report the
contents.

But what if you want to retain user-configurable settings in a .config file
(without asking the user to mess with the configuration file directly)?  I
know it has to be do-able, but I can't seem to find any documents about it.

Or do I have to read the .config file as an xml file into an XmlDocument and
manipulate it that way?  It would be nice if there was a simpler way.

===================================
This list is hosted by DevelopMentorR  http://www.develop.com Some .NET
courses you may be interested in:

Essential .NET: building applications and components with CSharp August 30 -
September 3, in Los Angeles http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with CSharp
August 30 - September 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to