DropDownListDisplay (ArrayList Input, Dropdownlist Inputddl, String Comparevalue)
{
For (int i = 0; i
{
ListItem AITEM = IITEM = IIT [I] as listitem;
Inputddl.Items.Add (AITEM);
}
IF (CompareValue! = ") Inputddl.selectedIndex = Inputddl.indexof (Inputddl.Items.FindByVlue);
}
Parameters: ArrayList, data that needs to be bound
DropDownList, bound drop-down list
CompareValue, a String type comparison parameter, used to set the drop-down list initial option