To get a connection string from .config file…
Add a reference to System.Configuration and then use the following…
using System.Configuration; ... var con = ConfigurationManager.ConnectionStrings["connection name"].ConnectionString;
To get a connection string from .config file…
Add a reference to System.Configuration and then use the following…
using System.Configuration; ... var con = ConfigurationManager.ConnectionStrings["connection name"].ConnectionString;
0 comments:
Post a Comment