I have this in webconfig
<add name="dbConn" connectionString="Data Source=PC-PC;Integrated Security=True" />
Then I call them most of the time in my page via
string connstr = ConfigurationManager.ConnectionStrings["dbConn"].ConnectionString;
However some page requires two queries. What I have in mind is (or what I like to achieve)
string connstr = ConfigurationManager.ConnectionStrings["dbConn"+"MultipleActiveResultSets=True"].ConnectionString;
But ofcourse it will not work. Since what stated in here is like the code below.
footnote: I don't wanna use this in most of my page
string connectionString = "Data Source=MSSQL1;" +
"Initial Catalog=AdventureWorks;Integrated Security=SSPI;" +
"MultipleActiveResultSets=True";
because i have multiple pages, and of course to easily set-up the DB.
footnote2: reason why is that because i don't know maybe it's not robust and using 2 connection in a page that only requires 1 connection maybe is ugly.
EDIT: Sorry for bad english