none
LIst box in 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 9:24 PM

All replies

  • Hi friend,

    Thanks for your post.

    This forum is for Visual Studio IDE, since your issue is more related ASP.NET developing, I will recommend  you post your issue here where you could get more professional and quick answer.

    https://forums.asp.net/

    Thanks for you understandings and supports.

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Thursday, June 15, 2017 9:35 AM
    • Proposed as answer by Fletch Zhou Monday, June 19, 2017 7:29 AM
    Thursday, June 15, 2017 9:35 AM