Set the selected item of a listbox or radiolist

Discussion in 'ASP .Net' started by Do, Dec 3, 2003.

  1. Do

    Do Guest

    Is this the correct syntax? I'm missing something about the list items, but
    I
    don't know where to find it.

    CType(e.Item.FindControl("lstEUsertype"), ListBox).SelectedValue() = "E"

    I want to automatically select the item in the list that has a corresponding
    value of "E". on the Edit command of the datagrid.

    But I get this

    Object reference not set to an instance of an object.
     
    Do, Dec 3, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Craig Buchanan

    Get the selected item from a listbox

    Craig Buchanan, Jun 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    2,032
    Craig Buchanan
    Jun 26, 2003
  2. rohith
    Replies:
    3
    Views:
    6,148
    rohith
    Aug 29, 2003
  3. martin
    Replies:
    2
    Views:
    13,097
    avnrao
    Jun 17, 2004
  4. David De Cotis

    ListBox selected item

    David De Cotis, Jun 15, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    22,405
    David De Cotis
    Jun 15, 2005
  5. =?Utf-8?B?S2FyZW4gR3J1YmU=?=

    How to change the color of the selected item in a web listbox cont

    =?Utf-8?B?S2FyZW4gR3J1YmU=?=, Jun 25, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,060
    Eliyahu Goldin
    Jun 26, 2005
  6. Iain
    Replies:
    3
    Views:
    1,172
  7. K B
    Replies:
    2
    Views:
    820
  8. mldardy
    Replies:
    0
    Views:
    1,153
    mldardy
    Sep 28, 2010
Loading...