1

Table

Id(Key)  Description(Value)             Car

1         scott                         BMW

2         john                          ford

Id and Description will be Key value pair to Dropdown. I have to display Car name in textbox based on the Id selected.

What will be the best way to achieve this.

Is there a way to avoid call to server for every dropdown event change.

1 Answer 1

2

You can store "Car" as a custom client-side attribute of ListItem element of the dropdown (it will become an attribute of <option> element when list item is rendered.

On client-side on onchange event you can retrieve that attribute and display it in the textbox.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.