Click here to Skip to main content
15,891,847 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to design data entry web app (C# VS 2015) Pin
David Mujica5-Oct-16 10:30
David Mujica5-Oct-16 10:30 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
Verdlin6-Oct-16 4:39
Verdlin6-Oct-16 4:39 
AnswerRe: How to design data entry web app (C# VS 2015) Pin
Nathan Minier6-Oct-16 1:17
professionalNathan Minier6-Oct-16 1:17 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
Verdlin6-Oct-16 4:41
Verdlin6-Oct-16 4:41 
AnswerRe: How to design data entry web app (C# VS 2015) Pin
kmoorevs23-Oct-16 6:36
kmoorevs23-Oct-16 6:36 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
Verdlin24-Oct-16 6:42
Verdlin24-Oct-16 6:42 
GeneralRe: How to design data entry web app (C# VS 2015) Pin
kmoorevs24-Oct-16 11:54
kmoorevs24-Oct-16 11:54 
AnswerChange Page Language Pin
Hakmeh Mohannad4-Oct-16 21:43
Hakmeh Mohannad4-Oct-16 21:43 
Hi Everyone

I added change Language button to the master page with the following code

VB
If Session("culture") = "en-US"
Session("culture") = "ar-SA"
else
Session("culture") = "en-US"
End If
Thread.CurrentThread.CurrentCulture = CultureInfo(Session("culture").ToString())
Thread.CurrentThread.UICurrentCulture = CultureInfo(Session("culture").ToString())
Server.Transfare(Request.Url.PathAndQuery)


Also added this code on Page_Init() for master page

VB
If Session("culture") Is Nothing Then
Session("culture") = HttpContext.Current.Request.UserLanguages(0)
End If


also for the controls it is like this

ASP.NET
<asp:Label Text="Text" meta:resourcekey="xxx" />


and i added App_LocalResources with 2 files for everypage(one for en and other for ar)

when i click on change language button it works but when move into other view within multiview inside same page language change back into user browser default language, so i have to click on change language button again to change the language



Can someone tell me what wrong with my code
P.S.: I tried with cookies same result


UPDATE:

i solved by using Global.asax and moved setting culture code into Application_OnAcquireRequestState event

modified 5-Oct-16 6:54am.

Questionimplementation digital signature with md5 hash in asp Pin
Member 127574633-Oct-16 22:28
Member 127574633-Oct-16 22:28 
AnswerRe: implementation digital signature with md5 hash in asp Pin
Nathan Minier4-Oct-16 1:20
professionalNathan Minier4-Oct-16 1:20 
QuestionHow do you hide a label, textbox and button on a form via yes/no toggle switch Pin
Bootzilla333-Oct-16 10:04
Bootzilla333-Oct-16 10:04 
AnswerRe: How do you hide a label, textbox and button on a form via yes/no toggle switch Pin
F-ES Sitecore3-Oct-16 23:27
professionalF-ES Sitecore3-Oct-16 23:27 
AnswerRe: How do you hide a label, textbox and button on a form via yes/no toggle switch Pin
Member 102180524-Oct-16 1:03
Member 102180524-Oct-16 1:03 
QuestionRDLC report header row visiblility issue .. Pin
Member 1178145530-Sep-16 1:59
Member 1178145530-Sep-16 1:59 
Rant[REPOST] RDLC report header row visiblility issue .. Pin
Richard Deeming30-Sep-16 2:22
mveRichard Deeming30-Sep-16 2:22 
QuestionGetting a HARD URL for Your own Action Pin
TheOnlyRealTodd29-Sep-16 20:49
professionalTheOnlyRealTodd29-Sep-16 20:49 
AnswerRe: Getting a HARD URL for Your own Action Pin
F-ES Sitecore30-Sep-16 1:12
professionalF-ES Sitecore30-Sep-16 1:12 
QuestionSum all values in datalist control Pin
Otekpo Emmanuel27-Sep-16 11:49
Otekpo Emmanuel27-Sep-16 11:49 
QuestionRe: Sum all values in datalist control Pin
ZurdoDev29-Sep-16 5:42
professionalZurdoDev29-Sep-16 5:42 
AnswerRe: Sum all values in datalist control Pin
Otekpo Emmanuel29-Sep-16 10:37
Otekpo Emmanuel29-Sep-16 10:37 
GeneralRe: Sum all values in datalist control Pin
ZurdoDev29-Sep-16 12:50
professionalZurdoDev29-Sep-16 12:50 
AnswerRe: Sum all values in datalist control Pin
Vincent Maverick Durano7-Oct-16 8:23
professionalVincent Maverick Durano7-Oct-16 8:23 
Questionchart from datatable in asp.net c# Pin
26s112424-Sep-16 20:53
26s112424-Sep-16 20:53 
AnswerRe: chart from datatable in asp.net c# Pin
Richard MacCutchan25-Sep-16 1:24
mveRichard MacCutchan25-Sep-16 1:24 
GeneralRe: chart from datatable in asp.net c# Pin
26s112425-Sep-16 18:36
26s112425-Sep-16 18:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.