Apr 29, 2011

Programmatically select an item in asp.net dropdownlist by text

Yesterday, I got following question:
Q: I have dropdownlist(say country) and the datasource is datatable having countryname, countrycode columns. I have to select proper country in dropdownlist from the text. I don’t have value(countrycode) to select. How can I do this?

Nov 12, 2010

jQuery: Common Operations on DropdownList (Combobox)

This post explains how you can perform common operations (like get/set selectedvalue, selectedindex and selectedtext .. etc) of dropdownlist (combobox) using jQuery. Let us take an example to understand: