Using Web.Config for Legacy .ASP to get A Connection String

G

gregory_may

I have a mixed ASP.NET and legacy ASP application.

Right now, the .ASP pages use a mix of Hard Coded connection strings and an
"Global Included" file. I would like to use the connection string in the
Web.Config for all the Legacy .Asp pages.

Anyone know of a good way to do this? Here is a snip of my Web.Config (from
one system).

I thought about doing a simple text search on "DataConnectionString" and
pulling the "Value", but I thought there may be a better way?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dataconnectstring" value="user id=ID;password=Pass;initial
catalog=cat;data source=source;pooling='false'" />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top