How to pass connection string from web.config to data access project?
Posted on 2010-09-02
I created a data access project, which access database and holds a number of strong typed dataset. When I created dataset in this project, it created a settings.setting file, which reads connection string from app.config file of this project.
However, I created another web project. this project is supposed to consume the data retrieved from data access project. this web project is having connection string in web.config.
my question is how to pass the connection string in web.config from web project to data access project. there is no reason to save the same connection string in different places. keeping connection string in web.config is no doubt easier to modify in deployment.