Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Session["current_language"] = form["languageid"];
- return View();
- public static class SessionFacade
- {
- public static string CurrentLanguage
- {
- get
- {
- //Simply returns, but you could check for a null
- //and initialise it with a default value accordingly...
- return HttpContext.Current.Session["current_language"].ToString();
- }
- set
- {
- HttpContext.Current.Session["current_language"] = value;
- }
- }
- }
- public ActionResultChangelangue(FormCollection form)
- {
- SessionFacade.CurrentLanguage = form["languageid"];
- return View();
- }
Add Comment
Please, Sign In to add comment