top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How prevent duplicate values, if text present in textbox , when added with listbox ?

+2 votes
419 views

I have a text named as "ABC" in textbox, I want to add it to a listbox...
If listbox contains already "ABC"or "abc"or "Abc"" or any combination of the letter "abc" should not allowed it.....

I am using c# code not vb.net....

posted Oct 14, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Dont have complete detail i.e. the code which you tried but it should be something like

if (!lstBox.Items.Contains(<text>))
{
        lstBox.Items.Add(listItem);
}
answer Oct 20, 2014 by Salil Agrawal
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...