Your idea of using two different databases and varying the connection string at the different domains sounds like a good idea to me. If I understand correctly, you want to use the same set of dynamic pages on two different servers to display content based on the connection string at the different locations.
I don't use asp myself, but I am familiar with it. I would think that the simplest way to do it would be to have the connection strings inside files that you could include at the top of all your dynamic pages that access the databases.
For both of the sites you could have a file perhaps called "database.asp" in an include directory and all your dynamic pages could have something like this at the top:
<!--#include file="include/database.asp"-->
Then you could use two different files named "database.asp" - one for each site with one containing something like:
<%
Const DB_Connection = "connection string one goes here"
%>
- <%
- Const DB_Connection = "connection string one goes here"
- %>
and the other:
<%
Const DB_Connection = "connection string two goes here"
%>
- <%
- Const DB_Connection = "connection string two goes here"
- %>
That way the only difference between the two sets of pages would be the contents of the "database.asp" file at the two different locations.
Free Programming Resources