Live Chat Icon For mobile
Live Chat Icon

How to select a specific Item in a ListBox in code

Platform: ASP.NET| Category: ListBox

VB.NET


ListBox1.Items.FindByValue(<Value>).Selected = true
’ListBox1.Items.FindByText(<Text>).Selected = true

C#


ListBox1.Items.FindByValue(<Value>).Selected = true;
//ListBox1.Items.FindByText(<Text>).Selected = true;

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.