protected void btn1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=GAYATHRI\SQLEXPRESS;Initial Catalog=VOY_SERVICES1;Integrated Security=True"); con.Open(); foreach (TreeNode tnode in TreeView1.CheckedNodes) { if (tnode.Checked == true) { string strTreeValue; strTreeValue = tnode.Value; SqlCommand com = new SqlCommand("insert into treeview_select(subdisease_name) values(@name)", con); com.Parameters.AddWithValue("@name", strTreeValue); com.ExecuteNonQuery(); con.Close(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)