I have a placeholder on a page which is populated with a dynamic table which has dynamic added textboxes (which is filled with language dependent data). The placeholder is filled with data on each page.load but with different data depending on which language choice a use makes. On the initial load english is set which works, but when the user change to french language the data in the textboxes is not changed from english to french. But when I debug I can see that the french language is added to each textbox. I have tried to disable viewstate on the table but that did not help. I also use PlaceHolder.Controls.Clear() before adding controls/data again to it. None of them works, still display initial english values in each textbox. What could be causing this?
Protected Function FindTextBoxValues(ByRef ParentControl As Control, ByRef MyList As List(Of String)) As List(Of String)
For Each ctrl As Control In ParentControl.Controls
If TypeOf ctrl Is TextBox Then
' do something
Dim CurrCtrl As New TextBox()
CurrCtrl = CType(ctrl, TextBox)
MyList.Add(CurrCtrl.Text)
ElseIf ctrl.HasControls Then
FindTextBoxes(ctrl, MyList)
End If
Next
End Function