Lookup data on WebListBox

what is the best way to search data on WebListBox and fast

Dim search1 As String
Dim ColCnt As Integer
Dim value As String = TxtSearch.Text
Dim I As Integer
Dim FoundAt As Integer = -1

ColCnt=0

if len(TxtSearch.Text)=0 then
listbox1.listindex=-1
else

FoundAt = -1
for i = 0 to listbox1.RowCount -1
  search1=Mid(listbox1.cell(i,ColCnt),1,Len(TxtSearch.Text.Trim))
  if instr(search1,value) > 0 then
    FoundAt = i
    exit
  end
next

if FoundAt >= 0 then
  listbox1.ListIndex = FoundAt
  //ListBox1.InvalidateCell(i,ColCnt)
  
else
  listbox1.listindex=-1
end if

end if

For me, I am typically displaying data that is stored in a database, so I prefer to do the searching there. There is a lot more flexibility that way.

hi Greg
how you do that.

do you have a example of code for it

thanks