string _Code = “21”;
IEnumerable<DataRow> drs = GetCodes(_Code);
foreach (DataRow items in drs)
{
ListItem li = new ListItem(items["CallingCode"].ToString(), items["CountryID"].ToString());
ddCountry.Items.Add(li);
}
//How can i sort the dropdownlist by calling code.
This might help…
Sort IEnumerable and List with property name