I would suggest not using the names like that. Store the controls in a Dictionary keyed on the suffix:You can then simply do this:vb Code:
Dim myDictionary As New Dictionary(Of String, TextBox) myDictionary.Add("EN", Me.txtKeywordEN) myDictionary.Add("FR", Me.txtKeywordFR) myDictionary.Add("ES", Me.txtKeywordES)vb Code:
lstKeyWords.Items.Add(myDictionary(CStr(drpDefaultLanguage.SelectedValue)).Text)




Reply With Quote