Click here to Skip to main content
15,887,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi Friends,

I have three projects in the solution, in which I have web.config in one solution.
Now I want to read connection string from web.config from one project to another project.
Please help me in this regards

Any help will be greatly appreciated.

Thanks
RK
Posted

Dear Friend,

You can Add the files as a link to the file to one of your projects.

Use Add an Existing Item to the project you want to add the file to - the Open button has a small down arrow, if you click that you can select Add as Link.

This will add the file as a link from the original location, meaning you only have one physical file.

About 329,000 results on "c# get connection string from another project web config"

Please don't forget to mark this as your answer if it helps you out.



Regards

Varun Sareen
 
Share this answer
 
I just read connectionstring from web project itself.
With that reference, I use configsingleton pattern to store the connectionstring as class file and I used all over the application.

Thanks
 
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