Home All Groups Group Topic Archive Search About
Author
26 Nov 2005 7:25 PM
Joe Reiss
Hi All,

How do I get the value of the DataValueField that is selected.  I don't want
the SelectedValue I want the actual field value.

So, if I display Staff Names within the drop down list, I don't want the
Staff Name, I want the StaffID which is the value contained in the
DataValueField.

Thanks,
Joe

Author
29 Nov 2005 6:05 PM
Hans
It should be like this.

value=ddownlist.items[ddownlist.selectedindex].value;
textvalue=ddownlist.items[ddownlist.selectedindex].text;

this Borland like language, but in Studio languages it should sound
familiar.

Hans


Show quoteHide quote
"Joe Reiss" <joere***@bellsouth.net> schreef in bericht
news:TC2if.27619$s92.4855@bignews6.bellsouth.net...
> Hi All,
>
> How do I get the value of the DataValueField that is selected.  I don't
> want the SelectedValue I want the actual field value.
>
> So, if I display Staff Names within the drop down list, I don't want the
> Staff Name, I want the StaffID which is the value contained in the
> DataValueField.
>
> Thanks,
> Joe
>
Are all your drivers up to date? click for free checkup

Author
2 Dec 2005 6:15 PM
Joe Reiss
Thanx,
I was able to work it out.  'Borland like' doesn't surprise me since C# is
Anders Heilsberg (spelling?) baby.  Of course he was mostly responsible for
Delphi of which has been my development language since 1995.


Show quoteHide quote
"Hans" <i***@tct.nl> wrote in message
news:438c98cc$0$2336$ba620dc5@text.nova.planet.nl...
> It should be like this.
>
> value=ddownlist.items[ddownlist.selectedindex].value;
> textvalue=ddownlist.items[ddownlist.selectedindex].text;
>
> this Borland like language, but in Studio languages it should sound
> familiar.
>
> Hans
>
>
> "Joe Reiss" <joere***@bellsouth.net> schreef in bericht
> news:TC2if.27619$s92.4855@bignews6.bellsouth.net...
>> Hi All,
>>
>> How do I get the value of the DataValueField that is selected.  I don't
>> want the SelectedValue I want the actual field value.
>>
>> So, if I display Staff Names within the drop down list, I don't want the
>> Staff Name, I want the StaffID which is the value contained in the
>> DataValueField.
>>
>> Thanks,
>> Joe
>>
>
>

Bookmark and Share