Last post May 13, 2017 11:01 AM by mgebhard
May 13, 2017 07:59 AM|maverick786us|LINK
I have a solution that contains 2 projects
1) The ASP.NET web application
2) A class file that is contains, business logic layer, data access layer and business entities.
Now the database connection and all DDL, DML operations are performed in the class file, whose reference is used by the ASP.NET application. However the web.config file resides in the ASP.NET page, and it contains the connection string. Therefore how do
we pass that connection string from ASP.NET application to that class file
May 13, 2017 11:01 AM|mgebhard|LINK
Well, you can simply pass the connection as a string parameter in a method. Also, since the DLL (project) is referenced by the web application, it will use the web.config of the main project.