Working with a 2 column Dropdown



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)





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

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