Working with a 2 column Dropdown

J

jonefer

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()....?
 
M

msnews

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top