Skip to content Skip to sidebar Skip to footer

App.config File In C# For Sql Server 2005 In Vs 2008

Possible Duplicate: app.config file in C# for MS SQL Server 2005 in VS 2008 I have C# .net project with SQL Server 2008 written in Visual Studio 2008. There I used the followin

Solution 1:

Put this in your app.config:

<configuration><appSettings><addkey="server"value="HASIBPC\SQLEXPRESS" /><appSettings></configuration>

And then in your code, access it using:

return ConfigurationSettings.AppSettings["server"].ToString();

Post a Comment for "App.config File In C# For Sql Server 2005 In Vs 2008"