Oct 07, 2008 03:49 PM|soccerwiz|LINK
I have a common connection string problem that I need some assistance with.
In my web application, I have multiple clients, each with their own database. I determine who the client is based on the URL. For example,
www.website.com/testclient. Once I determine the client, I need to set their connection string. I have multiple connect strings in a connection.config file that I reference in my web.config file.
Can I create a connection string in the global.asax, then change the above line to reference that connect string? Would that persist throughout the session, or do I have to add code to each user control to reference that connection string?
For example, can I do something like this?
this._connection.ConnectionString = cs.ConnectionString; in dataset;
ASP.NET Dynamic Data