.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Click once in dropdownlist for all page in global resources

Posted By: oswaldlily     Posted Date: July 29, 2011    Points:5   Category :ASP.Net
i m using global resources to convert to foreign language.
my dropdownlsit is in masterpage and i ve given codebehind below.
thou i have used session each page expecting me to click that foreign language.
In a nutshell,
i has two languahge english and french
when i click first page i ll select french.as a result whole pg ll chang to french.then when i click second page again pageloaded selected dropdownlist value ll be english..again i need to select french to coinvert..
this prob goin on for each page,,,can any1 give me soln?



Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Session("CultureInfo") = Thread.CurrentThread.CurrentUICulture.Name
ddl.SelectedValue = Session("CultureInfo")
End If

Protected Sub ddl_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ddl.SelectedIndexChanged
Session("CultureInfo") = ddl.SelectedValue
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Session("CultureInfo"))
Thread.CurrentThread.CurrentUICulture = New CultureInfo(ddl.SelectedValue)
Thread.CurrentThread.CurrentCulture = New CultureInfo(ddl.SelectedValue)
Server.Transfer(Request.Path)
End Sub

Responses
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

DO NOT PASTE THE CODING LIKE THIS HIGHLIGHT THE ERROR U R FACING


POST UR QUERIES

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Sasi Prabhu             
Posted Date: July 29, 2011     Points: 20   

Try

Reload the Page.

Thanks & Regards,
Sasi Prabhu.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend