1
Reply

How to prevent insertions of duplicate record into datatable

Renjith R

Renjith R

Jan 21 2015 5:10 AM
649
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)