Dynamic connection string from ASP
Hi,
We put the connection string in Web.config file and invoking the connection string using this System.Configuration.ConfigurationSettings.AppSett ings.Get("DSN")
in ASP.Net.
Web.config:-
<configuration>
<appSettings>
<add key="DSN" value="workstation id=APLNSERVER;packet size=4096;user id=sam;data source=APLNSERVER;persist security info=True;initial catalog=AHDB;password=nicuser"></add>
<add key="DSN_ASP" value="DRIVER={SQL Server};SERVER=aplnserver;UID=nicuser;PWD=nicadmin ;DATABASE=AHDB"></add>
</appSettings>
Is it possible to access the web.config file from AsP page?
Because In the ASP.net application contains Asp page, from that
Asp page we connect the database using connection string as directly. but actually want to access it as dynamically.
With regards
T.Jayaraj.
|