Save value in configuration file

A

Alan T

I want to store some values so that the application can read from a file,
eg. ini file, configuration file.
If I add a Application Configuration File, to store the name of files:

key = "sales"
value = "sales.ini"

key = "account"
value = "account.ini"

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

</configuration>

So if my application is processing sales transactions, I read the key
"sales" to fetch the name of the ini file "sales.ini".

What should I put inside the
<configuration> and
</configuration>
?
 
M

mcarbajal

The following works for me for asp.net 2.0:

<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="keyName" value="thevalue"/>
</appSettings>
</configuration>

Hope it helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top