I am using Ext.Net MVC with razor.

My goal is the following:
  • call @X.MyDropdownfieldFor(expression1, expression2, ...)
  • wanted result:
    • 1 Dropdownfield containing the result of expression1
    • 1 Hidden field containing the result of expression2

Context: I want to use a dropdownfield as a selection box for some referenced data, where the dropdownfield should contain the name of the selected element and the hidden field should contain the id of the selected element.

I want to accomplish that with razor and automatic model binding, so it seems to be impossible to use ValueText mode of dropdownfield here. (at least I haven't found a way to do that)

Thanks a lot for your help,