Home All Groups Group Topic Archive Search About

dataset values in a dropdownlist

Author
12 Apr 2005 12:45 PM
Filip De Backer
hi everyone,

I've got a dropdownlist.
A dataset with 3 fields is boudn tot the dropdownlist.
The ItemID field is bound to datavaluefield
the ItemName field is bound to datatextfield

when I select an item in the dropdownlist I want the third field
(ItemLongName) of the selected row in the dataset shown in a label.

How can I do that?

thansk for the answer,

Filip

Author
12 Apr 2005 3:48 PM
Brock Allen
You'll have to somehow refetch this third value based upon the current values
in the DDL. One way is to always go back to the database and get the third
value. If this DataSet the same data for everyone using your application,
then you could cache the DataSet in the ASP.NET data Cache object. If this
DataSet is per user, then you could store it in Session.

-Brock
DevelopMentor
http://staff.develop.com/ballen



Show quoteHide quote
> hi everyone,
>
> I've got a dropdownlist.
> A dataset with 3 fields is boudn tot the dropdownlist.
> The ItemID field is bound to datavaluefield
> the ItemName field is bound to datatextfield
> when I select an item in the dropdownlist I want the third field
> (ItemLongName) of the selected row in the dataset shown in a label.
>
> How can I do that?
>
> thansk for the answer,
>
> Filip
>