In webform after log in into an account, we use the following code in the Page Load function of each .aspx file to check whether the page is accessible or not:
if (Session["User"]!=null)
{
Response.Redirect("LoggedIn.aspx);
}
What should I do for performing the same thing in MVC5 ??


Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 20, 2017, 11:30 PM EST
Amit KumarRank #459 · 5.4K reputationPosted Dec 20, 2017, 11:54 PM EST
Sabab Zulfiker69 reputationPosted Dec 19, 2017, 11:23 PM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 19, 2017, 11:32 PM EST
Sabab Zulfiker69 reputationPosted Dec 20, 2017, 12:07 AM EST