none
Listbox in VB.net web app RRS feed

  • Question

  • Hi,

     I've been using ASP and vbscript for many years and am now getting my feet wet in VB.net. In the legacy ASP I am able to set the value of a listbox items and display a different text in the box to the user.

    How do I set up the list box in VB.net so that  I can show a title of a book, for instance, but have the underling value be a number representing an index?

    As an example,  the html code for one of the items in the box would looks like this: <option value="1234">xyz</option> . The result would show XYZ in the list but when the user selects that  item it returns the value of 1234.

    The only  option in the code that I see is xxx.items.add(xyz) which creates the HTML <option value="xyz">xyz</option>  . Is this at all possible in vb.net?

    THanks

    Wednesday, June 14, 2017 5:05 PM

All replies