1. protected void Button1_Click(object sender, EventArgs e)
2. {string s="Data Source=Black-PC\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True";
3. SqlConnection Conn = new SqlConnection(s);
4.
5. Conn.Open();
6. string strqry = “Insert into students values (” + TextBox1.Text +
7. “,’” + TextBox2.Text + “‘,’” + TextBox3.Text + “‘)”;
8.
9. SqlCommand Com = new SqlCommand(strqry, Conn);
10. Com.ExecuteNonQuery();
11. Conn.Close();
12.
13. }
when i create another page i have to rewrite connection string again, can anybody explain how to avoid writing connection string variable again and again, plz help me,