Here Mudassar Ahmed Khan has explained with an example, how to read (set) connection string from Web.Config file when using the ASP.Net SqlDataSource control.The Connection String will be set in the ConnectionStrings section of the Web.Config file and using the name of the ConnectionString setting, the SqlDataSource control will be assigned the connection string to the database.