i have a list box (listbox1) populated with some values.
i also have a table with some values.
I'd like to show values from table which are NOT IN listbox1
here's a code. I see what the problem is. Just can't understand what is the solution.
If I have one value in listbox it works fine, but if more than 1 it messed up, since it tries loop several times.
Solution should be easy.
ListBox1.Items.Clear();
var a = from i in db.tblItems
select i.Description;
foreach (var c in a)
{
foreach (var b in lbItems.Items)
{
if (c.ToString() != b.ToString())
{
ListBox1.Items.Add(c);
}
}
}
another Question.
I want to place validation in formview edititemtemplate and inse ...
Go to the complete details ...