Sunday, February 19, 2012

Assign the null value into the DataRow

this code is shown for assigning null values into the
Datarow...


DataRow[] rows = dataTable1.Select("EqID = " + Convert.ToInt32(txtEquip.Attributes["EquipId"]));
rows[0]["Ph_number"] = string.IsNullOrWhiteSpace(
txtPhNumber.Text) ? DBNull.Value : (object)Convert.ToInt32(txtPhNumber.Text);

No comments:

Post a Comment

Comments

Protected by Copyscape Plagiarism Software