I'm working on an ASP.NET MVC project, exactly on a void method in a Controller, and I need to use HttpContext.Current.Request.Cookies but Visual Studio recognized Current as an error, and not shown ( Current ) in the Intilisense.
This is my method :
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");
}
}
So please any help ?
using System.Web;in class?System.Web.HttpContext.Current?