I don’t know, why do we use HttpContext.Current?
In this property I use it for Session but I don’t know why!
public static string Name
{
get
{
if (HttpContext.Current.Session["_n_"] != null)
return HttpContext.Current.Session["_n_"].ToString();
else return "";
}
set
{
HttpContext.Current.Session["_n_"] = value;
}
}
HttpContextis an object that wraps all http related information into one place.HttpContext.Currentis a context that has been created during the active request. Here is the list of some data that you can obtain from it.Further you can control your output through this object. In
Itemsproperty, which is a dictionary, you can store instances of objects to ensure that they are created once for the request. You can control the output stream applying your custom filters.This is a short list of that what you can do with this property.