|
Home
Firebird and ADO.NET 2.0
Firebird and ASP.NET 2.0
Storing connection string in web.config
SqlDataSource
Deployment
Firebird and Visual Studio .NET 2005
|
Storing connection string in web.configIf you store the connection string in the web.config file in the connectionStrings section you can access it easily from both the page code and source. <configuration> ... <connectionStrings> <add name="mydb" connectionString="Server=localhost;User=SYSDBA;Password=masterkey;Charser=NONE;Database=c:\data\mydb.fdb" providerName="FirebirdSql.Data.FirebirdClient"/> </connectionStrings> ... </configuration> In the codeConfigurationManager.ConnectionStrings["mydb"].ConnectionString In the page source<%$ ConnectionStrings:mydb %>
|