In the above code, I am using ‘id’ as the value and ‘ClientId’ as text for the dropDownList and $data is the list of model objects from which these values come. Once I select the value, I would like to display in the div (id=‘info’) some text which is actually another attribute (name) of the model object and this information is available in $data. I can write a function in the controller which can be called to display this info in the required div by using jquery and $("#info").html. But I guess there must be a shorter way of doing since this information is readily available in the list of model objects for the dropdownlist.
Did you ever figure out how to do this? I am also attempting to do something similar, i.e. include an extra attribute in the option that would be available client side. I want to end up with options in a dropdown list whose markup looks something like this