Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > SelectedIndex only works when page displayed for first time

Reply
Thread Tools

SelectedIndex only works when page displayed for first time

 
 
Tony Z
Guest
Posts: n/a
 
      03-08-2005
I am stepping through a dataset on my web page and trying to set the
SelectedItem f\or a dropdownlist each time i go to the next row in the
dataset. However, setting the SelectedItem only works the first time the page
is displayed. Each time I step though the data set after the first, all the
data on the form changes EXECPT the selected item in the droplist list.
Looking at the pagesource from the browser shows NO selection in the list.

Any deas?
 
Reply With Quote
 
 
 
 
quaester
Guest
Posts: n/a
 
      03-09-2005
Try disabling the viewstate for the control, since it seems like you are
binding your controls again for each request.

"Tony Z" wrote:

> I am stepping through a dataset on my web page and trying to set the
> SelectedItem f\or a dropdownlist each time i go to the next row in the
> dataset. However, setting the SelectedItem only works the first time the page
> is displayed. Each time I step though the data set after the first, all the
> data on the form changes EXECPT the selected item in the droplist list.
> Looking at the pagesource from the browser shows NO selection in the list.
>
> Any deas?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
animated gif in iframe doesn't animate first time frame is displayed for long running process TS ASP .Net 2 12-16-2008 09:20 AM
PLEASE? Reorder of listitems only works first time K B ASP .Net 0 05-23-2006 03:23 AM
[RubyGems] require fails the first time called and works the second time Brian Takita Ruby 2 07-25-2005 04:56 PM
ActiveX object only works first time... =?Utf-8?B?QW5nZWxhQw==?= ASP .Net 0 12-06-2004 05:25 PM
showDocument method works only first time novel Java 5 01-20-2004 07:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57