HighTechTalks DotNet Forums  

Working with a 2 column Dropdown

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Working with a 2 column Dropdown in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jonefer
 
Posts: n/a

Default Working with a 2 column Dropdown - 07-28-2006 , 04:29 AM






I know how to fill a dropdown list and use it's selected value as a parameter.
How can I setup 2 columns, hide one column but use the hidden column (a key)
as the parameter

For example:

Prov, ProvID (hidden column)

=====
..SelectedValue.column()....?







Reply With Quote
  #2  
Old   
msnews
 
Posts: n/a

Default Re: Working with a 2 column Dropdown - 09-11-2006 , 06:57 AM






You can set the DataValueField and DataTextField properties to match the
properties you want set from the datasource. In this case, the hidden
parameter is the DataValueField. To get it back from the DropDownList after
a PostBack you get SelectedValue. It does work like a GridView where you do
have to hide the key fields to use them as parameters.

Brennan Stehling
http://brennan.offwhite.net/blog/

"jonefer" <jonefer (AT) discussions (DOT) microsoft.com> wrote

Quote:
I know how to fill a dropdown list and use it's selected value as a
parameter.
How can I setup 2 columns, hide one column but use the hidden column (a
key)
as the parameter

For example:

Prov, ProvID (hidden column)

=====
.SelectedValue.column()....?









Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.