473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Writing and Retrieving Configuration from an XML Document in C#

J-S
Hi,

I'm a student and new to the .net framework. What is the best way to save
configuration properties (not user specific) for a C# application? I read a
few messages talking about using XML to save properties. I read about using
app.config, but it seems you have to manually edit the file in order to
change its values, and I don't want those values hard coded. I'm trying to
avoid the registry. In my reading I have concluded that using an XML file
would have more advantages over using the registry, .ini or .dat file.

In my application I have a few textboxes, and every time this application is
opened I would like it to remember what the last user wrote. How can I
implement this using XML? Are there any good and simple examples about
creating an XML document and then reading/writing to it in C#?

Thanks a lot,

J-S.

Nov 16 '05 #1
0 1009

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Supra | last post by:
i got "system error" when saving to xml file. i am using checkbox1 control to xml. when user clicked checkbox and set to true and press btnOk to conform and save it to xml ...
1
by: sun | last post by:
In Javascript, I write to document.cookie, and retrieve it in server side. It's in a treenode control, when the node is expanded, I write document.cookie: if(subTree.style.display ==...
1
by: J-S | last post by:
Hi, I'm a student and new to the .net framework. What is the best way to save configuration properties (not user specific) for a C# application? I read a few messages talking about using...
3
by: Raj Kumar | last post by:
Hi! I have a text file that looks like this: <configuration> <appSettings> <add key="db_server" value="someserver" /> <add key="db_database" value="somedatabase" /> </appSettings>...
8
by: Steve | last post by:
Can anyone tell me the preferred method for writing and retrieving persistent information using .Net. Specifically, I am referring to information that you used to see in registry keys or .ini...
3
by: Eric | last post by:
Help! I created a XML schema with a Visual Studio tools. I'm filling a dataset with a DataAdapter. Before I use the "WriteXml" method to write the data to a xml file, I want to map the XSD file I...
0
bmallett
by: bmallett | last post by:
First off, i would like to thank everyone for any and all help with this. That being said, I am having a problem retrieving/posting my dynamic form data. I have a form that has multiple options...
34
by: vpriya6 | last post by:
Hi guys, I am new to Ajax, xml and javascript. I want to know how can I retrieve data from xml and display in the html page? please help me out. suppose my xml file is customer.xml the code...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.