Link to home
Create AccountLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Help with adding data to a listbox of a web application using VB.NET

Hi,

I am using the code below to add data from a textbox to a list box. How do I modify the code
to prevent users from entering duplicate data in the listbox?

Protected Sub ANSN_Click(sender As Object, e As EventArgs) Handles ANSN.Click
        Dim item As ListItem = New ListItem()
         item.Text = C1NSNA.TextWithPromptAndLiterals
        C1NSN.Items.Add(item)
    End Sub


Thanks,

Victor
ASKER CERTIFIED SOLUTION
Avatar of jitendra patil
jitendra patil
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Victor  Charles

ASKER

Hi,

It worked.

Thanks,

Victor