Monday, 22 September 2014

Connection string in app.config file in c#

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <connectionStrings>
    <add name="test" connectionString="Data Source=local;Initial Catalog=test;User ID=sa;Password=test;" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings>
    <add key="test" value="server=local;Initial Catalog=test;User ID=sa;Password=test"/>
  </appSettings>
  <system.net>
    <mailSettings>
      <smtp from="test@gmail.com">
        <network host="smtp.gmail.com" password="test" port="25" userName="test@gmail.com"/>
      </smtp>
    </mailSettings>
  </system.net>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>

No comments:

Post a Comment