Posted on: 3/7/2015 7:42:46 PM | Views : 570

I am trying to access the "connection string" from the master page and the content page and I have two different values.
Why is that?
I am using the ConfigurationManager
ConfigurationManager.ConnectionStrings["LocalSqlServer"].ConnectionString.ToString(); And from the Master page I got:
data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
But from the content page I got:
Data Source=LOCALHOST\SQLEXPRESS;Initial Catalog=CWB;Integrated Security=True; MultipleActiveResultSets=True;

Go to the complete details ...