We dont have session in mvc but we can store data with the help of tempdata, viewdata , viewbag
To pass a Seesion We use- System.Web.HttpContext.Current.Session[“UserArticleId”] = articleId;
To hold the value of a session we use-var articleId = System.Web.HttpContext.Current.Session[“UserArticleId”];For clear a session - System.Web.HttpContext.Current.Session.Clear();
Viewbag,tempdata,viewdata
HttpContext.Current.Session
You can use tempdata, viewdata and viewbag.