Web.Config

<connectionStrings>
 <add name="MyDB" connectionString="Data Source=[서버];Initial Catalog=[DB명];
UserID=[아이디];Password=[비밀번호]" providerName="System.Data.SqlClient"/>
</connectionStrings>

Code
SqlConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyDB"].ConnectionString);

+ Recent posts