2011年5月4日 星期三

.net 類別中使用Session和Response

寫一個cs檔放類別供呼叫時,會遇到無法直接使用Session和Response的情況
這時就要寫的迂迴一點
if (HttpContext.Current.Session["login"] == null)
HttpContext.Current.Response.Redirect("../");

以上
--
參考網址
http://www.w17x.com/AritcleDisplay.aspx?id=670

沒有留言:

張貼留言