PDA

View Full Version : web.config file


jmhc
09-30-2008, 02:51 AM
Hello there:

I've just created a new database in ixwebhosting servers and uploaded the data, now I want to connect my page to that database, but I just simply can set the web,config file correctly, can somebody help me with this, here is my web.cofig file is configured:

<?xml version="1.0"?>

<configuration>
<appSettings/>
<connectionStrings>

Server=ixservername;
Database=mydatabase;
Trusted_Connection=Yes;

</connectionStrings>

</configuration>

williane
09-30-2008, 08:18 PM
try something like:

<appSettings>
<add key="ConnectionString"
value="server=localhost;database=dbname;uid=user;password =pass;" />
</appSettings>


then you can call it from your code using ConfigurationSettings.AppSettings("ConnectionString")

Angela
02-09-2009, 12:25 PM
Thanks for sharing the config file. these links are ok too.
<appSettings>
<add key="ConnectionString"
value="server=localhost;database=dbname;uid=user;p assword=pass;" />
</appSettings>

Thanks williane