俺又来问问题了,这次不会没有人回答吧
目前有这样一个问题,因为我的程序需要根据客户访问的URL来自动判断如何设置当前的session["language"]
的值,开始我在 Global 中的Application_BeginRequest 中截获url来设定session,结果总出错,别人告诉我在这里不能操作session ,后来我在一个每个页面都会调用的class的构造函数中写
谁能给在下指点下if (HttpContext.Current.Session == nullreturn;
谁能给在下指点下            
string lan = HttpContext.Current.Request.ApplicationPath;
谁能给在下指点下            
//lan.Replace("/",String.Empty);
谁能给在下指点下
            switch( lan.ToLower() )
            }
  可是 这个HttpContext.Current.Session好像永远都是null,请高人指点一二,客户催得很急的说

相关文章:

  • 2021-11-07
  • 2022-01-19
  • 2021-08-18
  • 2021-09-04
  • 2022-01-18
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2021-06-02
  • 2021-08-02
  • 2021-05-07
  • 2021-08-31
相关资源
相似解决方案