What Exactly you want to do?
If the line of code for connection is all you need. Go for:-
string str = @"data source=
DEEPAKSHARMA-PC\SQLEXPRESS;initial catalog=new; integrated security=true";
SqlConnection con = new SqlConnection(str);
con.Open();
"YOUR CODE"
con.close();
Where the words in bold should be your SQL SERVER NAME. You can do following steps:-
1. Open Sqlserver Management Studio
2. Go to File-->Connection Object Explorer
3. Copy SERVER NAME
4. Replace DEEPAKSHARMA-PC\SQLEXPRESS with your copied code.
Or if you have user id and password,
Write this code:-
string str = @"data source=<b>DEEPAKSHARMA-PC\SQLEXPRESS</b>;initial catalog=new; user id="Your ID""; password="Your PASSWORD"";
SqlConnection con = new SqlConnection(str);
con.Open();
"YOUR CODE"
con.close();