Files
docs-desktop/dotnet-desktop-guide/framework/winforms/advanced/how-to-change-the-value-of-a-setting-between-application-sessions.md
T
Andy De George c0ba284473 Initial winforms content migrated (#18)
* Merge winforms framework content to working branch (#14)

* Breadcrumb / TOC / Move net5 to net folder (#15)

* change path from net5 to net

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Mess with bread/toc

* Add .net 5 winforms placeholder article (#16)

* added some metadata and adjusted net5 placeholder

* corrections

* corrections

* corrections

* Test1

* Swapping landing page vs concept

* fix links

* Fix links

* Fix desc
2020-09-01 16:26:21 -07:00

1.4 KiB

title, ms.date, helpviewer_keywords, ms.assetid
title ms.date helpviewer_keywords ms.assetid
How To: Change the Value of a Setting Between Application Sessions 03/30/2017
application settings [Windows Forms], changing
application settings [Windows Forms], between application sessions
1a85911f-97b2-476c-930b-83379edd890c

How To: Change the Value of a Setting Between Application Sessions

At times, you might want to change the value of a setting between application sessions after the application has been compiled and deployed. For example, you might want to change a connection string to point to the correct database location. Since design-time tools are not available after the application has been compiled and deployed, you must change the setting value manually in the file.

To Change the Value of a Setting Between Application Sessions

  1. Using Microsoft Notepad or some other text or XML editor, open the .config file associated with your application.

  2. Locate the entry for the setting you want to change. It should look similar to the example presented below.

    <setting name="Setting1" serializeAs="String" >  
       <value>My Setting Value</value>  
    </setting>  
    
  3. Type a new value for your setting and save the file.

See also