locked
VB.net (aspx) databound listbox and working indxes RRS feed

  • Question

  • Hello!

    I am developing an application with ASP.net (aspx), and have hit a small snag.
    This is easy to do with just VB.net, but with asp.net using VB, I can't seem to get it.

     

    Here's the issue, also I have attached code that works for a non databound listbox.

    You have a databound listbox that gets data from an access database.
    I want to get the index of an item based on input text:

    ListBox1.Items.IndexOf("test1")

    And secondly, how to get the item based on the index:

    MsgBox(ListBox1.Items.Item(1))

     

    How would I get the same results from a databound listbox?

    Thanks!

     

    • Moved by Martin_Xie Friday, January 13, 2012 3:53 AM Redirect to ASP.Net Forum for better support. (From:Visual Basic Language)
    Wednesday, January 11, 2012 10:28 PM

Answers

All replies