Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have login in my project. and i have used session for login purpose. for example currently i am loged in and now i change the url from abcdefg.com/home/dashboard to abcdefg.com , it redirects to the login page but i want it to redirect to my dasboard because the session has not timeout yet.

What I have tried:

no idea how to do it it tried session timeouts and cheked it for all conditions but i am not getting it how to use url for this purpose.
Posted
Comments
Chirag Sudra 19-May-18 0:50am    
On load of page load, first check the Session, if the session has not timed-out then redirect the user to Dashboard.

Try using
return RedirectToAction("Action","Controller");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900