Category: settings

  • Saving Setting for Windows Forms

    Saving and retrieving application settings Every application that I have made needs at minimum two things,that we will put on the generic term “ settings “: 1. “remember” their state – information that are read at the beginning,write at the end of the program . We will name those “local settings” because there are different…

  • Save settings – with a class that reads from or saves to app.config or web.config

    Step 1: Add reference to System.Configuration Step 2 :Derive your class from ConfigurationSection Step 3 : Put your values to be retrieved with ConfigurationProperty attribute Step 4: add a section to your config file and an entry Step 5 : read with ConfigurationManager.GetSection and convert to your class Download code See video

  • How To … Read database connection strings from app.config or web.config file

    Step 1 : Add a app.config file Step 2: Add the connection string Step 3: Add reference to system.configuration Step 4: Use the connection from ConfigurationManager.ConnectionsStrings   download visual studio solution