Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Is there anyway to get the previous selected item in a drop down list

Reply
Thread Tools

Is there anyway to get the previous selected item in a drop down list

 
 
KJ
Guest
Posts: n/a
 
      07-30-2004
Is there anyway to get the previous selected item in a drop down list
when you change the selection?
 
Reply With Quote
 
 
 
 
Juno
Guest
Posts: n/a
 
      07-30-2004
Hi,


If you want to get previous selected item, you can save the current selected
value in viewstate.
When postback, the current selected item becomes previouse item, and you can
get it from viewstate.

--
Juno
MCSD.NET, MCDBA, MCSE
----------------------------------------------------------
Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
DataForm.NET - The most powerful data entry web server control for ASP.NET



"KJ" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Is there anyway to get the previous selected item in a drop down list
> when you change the selection?



 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      08-02-2004
This works if you dynamically add days to your drop-down, but if you
have 1, 2, and 3 in your drop-down and change it from 3 to 1 on
postback the selected item is 1 not 3. So you will be saving the
selected value 1 in viewstate




> Hi,
>
>
> If you want to get previous selected item, you can save the current selected
> value in viewstate.
> When postback, the current selected item becomes previouse item, and you can
> get it from viewstate.
>
> --
> Juno
> MCSD.NET, MCDBA, MCSE
> ----------------------------------------------------------
> Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
> DataForm.NET - The most powerful data entry web server control for ASP.NET
>
>
>
> "KJ" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > Is there anyway to get the previous selected item in a drop down list
> > when you change the selection?

 
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
Enable second drop down after first drop down is selected teser3@hotmail.com Javascript 0 01-28-2009 12:59 AM
Re: Setting 'selected' item in bound drop down list Marina ASP .Net 6 01-21-2008 04:33 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Get Value of Selected Item From Drop Down List Stephen Adam ASP .Net 3 11-30-2004 06:35 PM
Drop down list does not see the selected item! =?Utf-8?B?TWVyZGFhZA==?= ASP .Net 4 10-20-2004 10:25 PM



Advertisments