Save value in configuration file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan T

    Save value in configuration file

    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.in i"

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

    </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
    <configurationa nd
    </configuration>
    ?




  • mcarbajal@gmail.com

    #2
    Re: Save value in configuration file

    The following works for me for asp.net 2.0:

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

    Hope it helps.

    Alan T wrote:
    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.in i"
    >
    <?xml version="1.0" encoding="utf-8" ?>
    <configuratio n>
    >
    </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
    <configurationa nd
    </configuration>
    ?

    Comment

    Working...