if you use .net 2.0 you can only declare connectionstring within <appsettings> in web.config.
but if you use .net 3.5 means you can directly specify connectionstring within <connectionstring> tags in webconfig.
---------------------------------------------------------------------------------
in .NET 3.5:
<connectionstrings>
<add>
name="ConnectionStringname";
connectionString="Data Source=serverName;Initial
Catalog=yourdb;Persist Security Info=True;User
ID=userName;Password=password";>
</add></connectionstrings>
you can call it in program by using,
string connStr = ConfigurationManager.ConnectionStrings["ConnectionStringname"].ConnectionString;
-----------------------------------------------------------------------------------
in .NET 2.0:
<appsettings>
<add key="ConnectionInfo" value="server=(local);database=yourdb;Integrated Security=SSPI">
</add></appsettings>
you can call it in program by using,
string connectionInfo = ConfigurationSettings.AppSettings["ConnectionInfo"];