Hi,
for Checked nodes do it like:
SqlConnection conn = new SqlConnection(strConnString);
con.Open();
foreach (TreeNode item in this.TreeView1.CheckedNodes)
{
string query = "INSERT INTO TableName VALUES ('" + item.Text + "')";
SqlCommand cmd = new SqlCommand(query, conn);
cmd.ExecuteNonQuery();
}
con.Close();
Mitja
No comments:
Post a Comment