Hi snehasis,
If you are using sql server then you can try the following code.
INSERT INTO (TableName) (Column Names) VALUES (@checkBox1, @checkBox2, @checkBox3)
Here @checkBox1, @checkBox2, @checkBox3 are the parameters to the insert statement.
For C# Code you can try the following code.
foreach (DataListItem item in Security1.Items) {
CheckBox CheckBox1 = (CheckBox)item.FindControl("CheckBox1");
if (CheckBox1.Checked) {
HiddenField h = (HiddenField)item.FindControl("FeaID");
string add = "Insert into Carfeature (RecID,FeatureID) values ((select Max(RecID) from record),@FeatureID)";
cmd[k] = new SqlCommand();
cmd[k].CommandType = CommandType.Text;
cmd[k].Parameters.Add("@FeatureID", SqlDbType.Int).Value = h.Value;
cmd[k].CommandText = add;
k++;
}
}
For reference follow the following link.
Insert Query
Thanks