473,396 Members | 1,942 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,396 software developers and data experts.

Dropdownlist whoas

I do not know why this is being such a problem to me today, hopefully
someone can help me figure out where I am going wrong.

Simple DropDownList that is populated from a arraylist. Current setting of
the item is set to selected, otehr items are possible other settings. When I
select a different value for the setting, autopost back is fired and
SelectedIndexChangeEvent is called. HOWEVER for some reason the
SelectedItem.Value and SelectedValue properties are that of the original
data item, not the one that was just selected. I can not seem to find the
newly selected value anywhere.

So where can I find the newly selected Item?

TIA,
Kent

Nov 29 '05 #1
3 916
Kent,

Did you serialize your arraylist, put it in a session and deserialized it in
the load event again from that at IsPostback.

Using a datast is easier by the way, that you don't have to
serialize/deserialize

I hope this helps,

Cor
Nov 29 '05 #2
Thanks Cor,

The issue was actually simpler than that in the fact I had missed checking
IsPostBack in the Page_Load event. Which meant the drop down was repopulated
prior to my checking for the SelectedValue. I just knew I was missing
something really simple.

Thanks,
Kent
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:eo*************@TK2MSFTNGP12.phx.gbl...
Kent,

Did you serialize your arraylist, put it in a session and deserialized it
in the load event again from that at IsPostback.

Using a datast is easier by the way, that you don't have to
serialize/deserialize

I hope this helps,

Cor

Nov 29 '05 #3
It's because you are re-binding on postback and therefore loose your
viewstate

If Not IsPostback

DataBind

End If

--
Best Regards

The Inimitable Mr Newbie º¿º
"Kent Ogletree" <ke**@actionic.com> wrote in message
news:e7**************@TK2MSFTNGP10.phx.gbl...
I do not know why this is being such a problem to me today, hopefully
someone can help me figure out where I am going wrong.

Simple DropDownList that is populated from a arraylist. Current setting of
the item is set to selected, otehr items are possible other settings. When
I select a different value for the setting, autopost back is fired and
SelectedIndexChangeEvent is called. HOWEVER for some reason the
SelectedItem.Value and SelectedValue properties are that of the original
data item, not the one that was just selected. I can not seem to find the
newly selected value anywhere.

So where can I find the newly selected Item?

TIA,
Kent

Dec 6 '05 #4

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

Similar topics

12
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
2
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of...
12
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
0
by: asmx126453 | last post by:
Hey mensen I am having some big troubles here i tryd solving it myself with internet for 2 days but i kind fix it. Its about this i have a DotNet project that alrydi is online and working for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.