I'd like to populate four dropdowns using code behind. Each dropdown contains the same list. How can I populate them using a subroutine. Something like:
InitializeDropDownList(ddlQuadrant1) 'Where ddlQuadrant1 is the first dropdown
InitializeDropDownList(ddlQuadrant2) 'Where ddlQuadrant2 is the second dropdown
InitializeDropDownList(ddlQuadrant3) 'Where ddlQuadrant3 is the third dropdown
InitializeDropDownList(ddlQuadrant4) 'Where ddlQuadrant4 is the fourth dropdown
Which calls something like this:
Private Sub InitializeDropDownList(ByVal ctlDropDownList As DropDownList)
ctlDropDownList.Items.Insert("", "")
ctlDropDownList.Items.Insert("Application/Credit", "Application/Credit")
ctlDropDownList.Items.Insert("Note Features", "Note Features")
ctlDropDownList.Items.Insert("Regency", "Regency")
ctlDropDownList.Items.Insert("ARM Info", "ARM Info")
ctlDropDownList.Items.Insert("Pay History", "Pay History")
ctlDropDownList.Items.Insert("Property", "Property")
ctlDropDownList.Items.Insert("Valuation Comments", "Valuation Comments")
ctlDropDownList.Items.Insert("Diligence Comments", "Diligence Comments")
ctlDropDownList.Items.Insert("Compliance", "Compliance")
End Sub