Renjith R

Renjith R

  • NA
  • 14
  • 6.9k

How to prevent insertions of duplicate record into datatable

Jan 21 2015 5:10 AM
foreach (Selected s1 in objlistCropped)
{
string strImg2 = s1.Image;
if (strImg1 == strImg2)
{
dtPreInstallation.Rows.Add(strImg2, s.strText);
}
}

strImg1 = Img1.Jpeg,
I need to restrict adding img1.jpeg again if its already there in datatable.
Thanks in Advance

Answers (1)