Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Localization in master page via dropdownlist

$
0
0

Hi guys, i have successfully change localization in [web form without master page].

But it's not working when i wanna change localization in web form with master page. pls advice. tq

master page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head runat="server"><title></title></head><body><form runat="server"><asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" meta:resourcekey="DropDownList1Resource1"><asp:ListItem Value="en-us" meta:resourcekey="ListItemResource1">English</asp:ListItem><asp:ListItem Value="hi-in" meta:resourcekey="ListItemResource2">हिंदी</asp:ListItem></asp:DropDownList><asp:ContentPlaceHolder ID="MainContent" runat="server"/></form></body></html>

default.aspx.vb

    Protected Overrides Sub InitializeCulture()

        If Request.Form("DropDownList1") IsNot Nothing Then
            'for UI elements
            UICulture = Request.Form("DropDownList1")

            'for region specific formatting
            Culture = Request.Form("DropDownList1")
        End If

        MyBase.InitializeCulture()

    End Sub

 



Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>