Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to declare connection string in my web.config file as default so that i may not need to use the key of the connection string in my code behind file. I am using MS Enterprise Library in which we have
Database db = DatabaseFactory.CreateDataBase();


Plz guide.
Posted
Updated 5-Mar-11 0:59am
v2
Comments
Ali Al Omairi(Abu AlHassan) 5-Mar-11 7:11am    
make an intermedeate class.

http://msdn.microsoft.com/en-us/magazine/cc163766.aspx[^]

http://www.devx.com/dotnet/Article/30910/1954[^]

If i misunderstand your question, please feel free to correct me.
I hope the above information will be helpful. If you have more concerns, please let me know.
 
Share this answer
 
XML
<connectionStrings>
   <add name="myConString" connectionString="" providerName="System.Data.SqlClient" />
 </connectionStrings>
 
Share this answer
 
v2
thanks that's what i was looking for
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900