Victor Charles
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.TextWithPromptAndLi terals
C1NSN.Items.Add(item)
End Sub
Thanks,
Victor
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.TextWithPromptAndLi
C1NSN.Items.Add(item)
End Sub
Thanks,
Victor
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
It worked.
Thanks,
Victor