public static modelClass getCurUserFromSession()
{
try
{
return HttpContext.Current.Session["LoginUser"] as modelClass;
}
catch (Exception ex)
{
return null;
}
}
原文:http://www.cnblogs.com/DTWolf/p/4729328.html