Click here to Skip to main content
15,903,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
db connection using webconfig
Posted

This is not a question, nor does it make sense. Your web.config can store a connection string, but the fact that it does, doesn't change your DB connection code. I would suggest that if you thought this was a worthwhile thing to ask, then you really need a lot more help than you can get in a forum, try buying a programming book, or taking a course.
 
Share this answer
 
I agree that this is lazy question asked without much of effort shown.

Still, based on the content (whatever!) shared, this should help: AppSettings In web.config [^]
 
Share this answer
 
You can set conncetion in Web config File,

like below

XML
<connectionstrings>
		<add name="master" connectionstring="Data Source=10.101.65.178;Initial Catalog=master;User ID=sa;Password=xxxx" providername="System.Data.SqlClient" />
    
	</connectionstrings>
 
Share this answer
 
Comments
Unareshraju 19-Jul-12 2:24am    
yes

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