cnxmax
asked on
Request.Form cannot find dropdownlist on TabContainer.TabPanel
I call InitializeCulture (override, see code from VB codebehind) as the result of a selectedIndex change from a dropdownlist. When the DropDownListLanguage control is placed on the web page it works fine. When the DropDownListLanguage control is moved to tabpanel 0 of a AJAX toolkit tabcontainer the Request.Form can no longer find it and the culture is not intialized to the newly selected value. Is there a way for Request.Form to find a dropdownlist when it is placed on a tabpanel of a tabcontainer? Or any other idea to let me keep DropDownListLanguage control on the tabpanel and still change the culture using an override of InitializeCulture .
Protected Overrides Sub InitializeCulture()
If Request.Form("DropDownListLanguage") IsNot Nothing Then
Dim sCulture As String = ""
Dim selectedLanguage As String = Request.Form("DropDownListLanguage")
If selectedLanguage = "English" Then
sCulture = "en-US"
ElseIf selectedLanguage = "Español" Then
sCulture = "es-MX"
Else
sCulture = "en-US"
End If
UICulture = sCulture
Culture = sCulture
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(sCulture)
Thread.CurrentThread.CurrentUICulture = New CultureInfo(sCulture)
MyBase.InitializeCulture()
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER