I have a form with 14 dropdown lists on it. I'm populating the first of the 14 though a database query. This is working fine. The other 13 dropdown lists need to be identical to the first one. Instead of hitting the database for each one, I'd rather just make the others carbon copies of the first one. But I'm not sure how to do that. The dropdown lists are named named ddlODRTC1 - ddlODRTC14.
I'm thinking of something like this:
'Create a loop to copy data from ddlORTC1 to the other DDLs
For xCounter As Integer = 2 To 14
Dim ddlODRTC As DropDownList = Me.FindControl("ddlODRTC" & xCounter)
If Not ddlODRTC Is Nothing Then
'copy values of ddlODRTC1 to ddlODRTC
I'm fairly certain this'll work, I'm just not sure how to actually copy the data from one dropdown list to another. Can anyone help me with this?