views:

65

answers:

2

Hi Everyone,

i have to short questions on ASP MVC. Where is the best place for setting on Session.LCID ?

Thanks

A: 

http://www.123hostnow.com/articles/LCID.asp

i'm aware of how to use it and what is does... the question how to set it the best way in mvc on session start.
csharpnoob
A: 

In three places:

Upon login, inside the controller once successfully authenticated.

When they change their culture setting explicitly.

Before they are logged in you would base it on browser or ip address and set in a base controller, reading from the session first to check if it's been set above.

dove
okay, but why show an english page to german, french, etc before login? before login select by browser, then save by login, cookie etc. this doen't anwser the question.again, what is the best way and place in mvc framework to set the session. i dont want the controller because if someone calls another controller direct, i have to spread it over the whole code. must be easier way of doing this
csharpnoob
updated answer for this.
dove
base controller is the answer!
csharpnoob