473,386 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

1 dropdown among many won't hold it's state... why?

I've got a really big page with a few different panels and controls on
each panel. On panel 1 are many dropdownlists. The one list will not
hold state but the others do. I've checked everything I can think of.
I'm not rebinding data to the ddlist or changing the selectedindex at
anytime during postback. I only bind data to it upon the page's first
load. I've set enableviewstate=true which since the rest of the page
is holding state, I figured it should be that way anyway, but nothing.
Anyone know what else I can look at? This is VS2005 if that makes a
difference. Thanks.

Feb 27 '06 #1
4 946
By any chance, you don't share the same item list between multiple ddls, do
you?

Eliyahu

"vtxr1300" <ca********@hotmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
I've got a really big page with a few different panels and controls on
each panel. On panel 1 are many dropdownlists. The one list will not
hold state but the others do. I've checked everything I can think of.
I'm not rebinding data to the ddlist or changing the selectedindex at
anytime during postback. I only bind data to it upon the page's first
load. I've set enableviewstate=true which since the rest of the page
is holding state, I figured it should be that way anyway, but nothing.
Anyone know what else I can look at? This is VS2005 if that makes a
difference. Thanks.

Feb 27 '06 #2
No I'm not doing that. In fact, I've tried it without binding anything
to the list and hard coding the list items in the html, but still no
dice.

Feb 27 '06 #3
Okay, I finally figured out why it's not holding state, but I'm not
sure what to do to fix it. Basically my list has a 5 items. At this
point, each item has the same value, just a different text value. I
changed it so that each listitems value is different and now it holds
the state. So, since each listitem's value=11, it just selects the
first item with the value 11 in the list. Shouldn't it select it based
off of selectedIndex and not selectedValue?

Feb 27 '06 #4
As a workaround you can handle a client side event raised on the ddl
selected item change. In the event you can save the selected item index in a
hidden input control and pass it on to the server side.

Eliyahu

"vtxr1300" <ca********@hotmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Okay, I finally figured out why it's not holding state, but I'm not
sure what to do to fix it. Basically my list has a 5 items. At this
point, each item has the same value, just a different text value. I
changed it so that each listitems value is different and now it holds
the state. So, since each listitem's value=11, it just selects the
first item with the value 11 in the list. Shouldn't it select it based
off of selectedIndex and not selectedValue?

Feb 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
3
by: phil2phil | last post by:
hi, had a question on preloading a dropdown. we have a textbox and dropdown on the page, user is suppose to enter in a zip into textbox, then the dropdown should load the state based on the zip. ...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
5
by: Gil | last post by:
Is there a way to tell if a combbox is in dropdown mode. I tried and if statement combobox.dropdown = true but i get an error. dropwndown function doesnt store if its true or false what i am...
5
by: Deepson Thomas | last post by:
Hi, Currently iam facing a strange problem.. One dropdown in my page is not keeping itz state after postback. Whichever the item i select irrespective of that after the post-back the default...
2
by: Sam | last post by:
A) Destination Table with 4 Fields. 1) Last Name 2) First Name 3) State 4) Zip Code. B) Look up table State/Zip Code with 2 Fields
2
by: cmrhema | last post by:
Hello I have updated a small table in sql server using C# ans asp.net Among the many fields stored there one is state which is in a dropdownlist. I have inserted and insertion works fine. Now I...
7
by: Brita | last post by:
I have dropdown navigation drawing from a database. There is a dropdown box for all the states we have. When you choose a stat, the counties in the next dropdown box are created. My problem is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.