using App.config

hi! i already created my app.config but i cant seem to use it in my program.. how do i call the connection i had placed in it



Answer this question

using App.config

  • g-spot-web

    if i change the string in the app.config and just run the exe of the program. would the program work
  • ReLoad

    If u got the answer . please mark it as answer

    Thanks

    Ratheesh



  • RamiEmad

    thanks! i now know how to use app.config. thanks!
  • lushdog

    call the connection as

    string connection = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]

    where ConnectionString ( app.config) contains the string u want to retrieve

    Regards

    Ratheesh



  • Daltongr419461

    you may wish to look at this:

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=791689&SiteID=1

    perhaps this will help you in some way



  • Diegota

    Yes it will work..That is the use of app.config.We don't want to recompile the project again.simply change the connection string as u like

    Thanks

    Ratheesh



  • using App.config