Save and read Connection String in App.Config file.


In this video tutorial, Mudassar Khan has explained how to store and access Connection String in Windows Application (Windows Forms) using C# and VB.Net.

The Connection String will be stored (saved) in the App.Config file inside its ConnectionStrings section and later it will be read in code using the ConfigurationManager class in C# and VB.Net.

In Windows applications, Class Library or Console applications one has to reference the System.Configuration Assembly in order to read Connection String value from the App.Config file.



Download FREE API for Word, Excel and PDF in ASP.Net
 
ArticleId:2037

© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.