Welcome to the FoxLearn
Today we will learn how to change connection string dynamically
First, We will design a simple UI that allows you to enter the SQL Server information, then check the connection to the SQL Server
We will create a SQL helper class to check the connection to the SQL Server
You need to add a connection string to the app.config file
We always use Connection String in forms that we design but when you design a big software you should set the connection string for once and use it in many forms
In this method you use the name of the Connection String instead of the connection string text
Every time you want to change the connection string just change the main connection string in the App.Config file
By this method you don't need to change all of the forms in your project, just change the Connection String in the App.Config file
We will create an AppSetting class to save the connection to the app.config file
Thank you for watching this video