write,
using System.Data.SqlClient at top of the .cs page
on any event where you want to make connection write
string strConn="Data Source=<Server name>;Initial Catalog=<database name>;uid=<user id>;pwd=<password>";
SqlConnection con = new SqlConnection(strConn);
to open connection write
con.open();
do next what u like....
|