나는 정확히에하는 ASP.NET MVC 프로젝트에서 일하고 있어요 void method
A의 Controller
, 나는 사용해야 HttpContext.Current.Request.Cookies
하지만 Visual Studio에서 인식 Current
오류로, (도시하지 Current
에) Intilisense .
이것은 내 방법입니다.
public void User_Access_Validation()
{
var T_8 = HttpContext.Current.Request.Cookies["T_8"];
var T_5 = HttpContext.Current.Request.Cookies["T_5"];
var T_T = HttpContext.Current.Request.Cookies["T_T"];
HttpContext.Current.Request.Cookie
if (T_8 == null || T_5 == null || T_T == null)
{
response.Redirect("/Login");
}
}
그래서 도와주세요?
vivek nuna 가 그의 답변에서 언급 했듯이 귀하의 경우 System.Web.HttpContext.Current.Cookies["xxx"]
에 작업해야 할 때 사용해야 Current
합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다