Stark

Stark

  • NA
  • 40
  • 36.1k

how to make changes in app.config file.

Mar 13 2013 10:37 PM

Can someone please help me. i am making a windows form that will change the app.config file values that the user enters in the textbox through the form.

iam using an external connection string.which is my connection string is inside the app.config file.

i want to change the machine_name, database_name, id, and password entered from the form and save it.or modify it.

my app.config file is:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <connectionStrings>
    <add name="Conn" providerName="System.Data.SqlClient"
       connectionString="Data Source=machine_name; Initial Catalog=database_name; User ID=id; Password=password" />
  </connectionStrings>
     </configuration>

please help me.


Answers (1)