Hi Dear,
try this code in app.config file
="1.0"
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<connectionStrings>
<add name="SqlServerConnectionstring" connectionString="Password=password;Connection Timeout=0;Persist Security Info=False;User ID=userid;Initial Catalog=Database Name;Data Source=servername;" />
</connectionStrings>
</configuration>
in C# form page use the following code to acces the SqlServerConnectionstring
ConfigurationManager.ConnectionStrings["SqlServerConnectionstring"].ToString();