Results 1 to 9 of 9

Thread: Getting the value from a dropdownlist [Abandoned]

Threaded View

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Getting the value from a dropdownlist [Abandoned]

    Here's the scenario. I have page with a dropdownlist on it. In the save button's click event, I am retrieving the value like this:

    VB Code:
    1. strDesig = Me.listDesignation.Items(Me.listDesignation.SelectedIndex).Value

    Now this works.

    However, when I set the EnableViewState property of the page to false, the code errors out at the above line, showing me that .SelectedIndex is -1.

    This is despite the control's EnableViewState property being set to True.

    Any clues?
    Last edited by mendhak; May 18th, 2005 at 12:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width