R
rc
Hello,
We have several asp.net pages (.aspx) that access SQL server. Currently, we
use a connection string like this:
Conn=New SqlConnection("Server=servername;uid=id;pwd=password;database=db")
Is there a way to have the connection string (the part in quotes) included
from another file?
The reason I ask is, in the future, we will move the SQL data to another
machine and thus, a different connect string will be needed. It would be
nice to only change one file instead of every page that needs the
connection.
I know include files are commonly used all the time, but I'm not familiar
with how to only include one line at this location.
Any insight would be helpful.
Thank you
We have several asp.net pages (.aspx) that access SQL server. Currently, we
use a connection string like this:
Conn=New SqlConnection("Server=servername;uid=id;pwd=password;database=db")
Is there a way to have the connection string (the part in quotes) included
from another file?
The reason I ask is, in the future, we will move the SQL data to another
machine and thus, a different connect string will be needed. It would be
nice to only change one file instead of every page that needs the
connection.
I know include files are commonly used all the time, but I'm not familiar
with how to only include one line at this location.
Any insight would be helpful.
Thank you