Drop Down List Selected Text

Drop Down List Selected Text


I'm coming back to you with another question, I hope that you can help me.

I have a page with a dropdown control, which is bound to a Source Entity.

How can I get the selected text? I want to keep the value of the combo as the ID.

C# alternative:

DropDown.SelectedItem.Text -> this is what I want
DropDown.SelectedValue -> I want to be able to get the value as well, to save it in the database

Hi Liviu,

When using the combo, the user can see a list of whatever attribute you want/set, but the variable associated with that choice is an Identifier.
Then, on change or when saving that edit record you can use an aggregate/query with the user's selected Id in the combobox, to fetch the text or value of other attributes associated with that Id.
Hello Tiago,

Thanks for your reply.

Unfortunately I have a lot of drop down boxes on the page and the fact that I need to use queries makes my life complicated... :) I was hoping that there is another solution, more direct...