Guest User

Untitled

a guest
Jun 25th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Session["current_language"] = form["languageid"];
  2. return View();
  3.  
  4. public static class SessionFacade
  5. {
  6. public static string CurrentLanguage
  7. {
  8. get
  9. {
  10. //Simply returns, but you could check for a null
  11. //and initialise it with a default value accordingly...
  12. return HttpContext.Current.Session["current_language"].ToString();
  13. }
  14. set
  15. {
  16. HttpContext.Current.Session["current_language"] = value;
  17. }
  18. }
  19. }
  20.  
  21. public ActionResultChangelangue(FormCollection form)
  22. {
  23. SessionFacade.CurrentLanguage = form["languageid"];
  24. return View();
  25. }
Add Comment
Please, Sign In to add comment