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

Open in new window

cnxmaxAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SoLostCommented:
Is the drop down list a .NET drop down list or a standard HTML one?

If it is an ASP.NET drop down list you should not reference it via Request.Form

i.e.

Dim selected Language as String = DropDownListLanguage.SelectedValue

If it is an ASP.NET drop down list and you have a reason for referencing it as Request.Form("DropDownListLanguage") then I would suggest that it has been renamed on the page due to the fact that it is now embedded inside another ASP.NET object.

If this is the case you will need to reference it as Request.Form(DropDownListLanguage.ClientID)

ClientID is the name that the control was given when the page was rendered.

You can check this yourself by looking at the source of the page and seeing what name the control has been given.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cnxmaxAuthor Commented:
Great Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.