1
protected void Button2_Click(object sender, EventArgs e)
{
using (SqlConnection con = new SqlConnection())
{
con.ConnectionString = @"ADMIN\LOCALHOST;Initial Catalog=maha;Integrated Security=True";
con.Open();
SqlCommand cmd = new SqlCommand("Insert into dbo.student Values ('" + TB1.Text + "','" + TB2.Text + "','" + TB3.Text + "','" + @rm + "')", con);
cmd.ExecuteNonQuery();
con.Close();
}
}