Mangesh Kanche

Mangesh Kanche

  • NA
  • 247
  • 18.4k

Redirect to same page after successful log in

Dec 24 2018 9:17 PM
Hello friends,
I need your help for following scenario.
 
I'm having following pages
1. home.aspx
2. login.aspx
3. page1.aspx
4. page2.aspx 
 
Now Home page will be accessed without any authentication.
If user clicks page1 and page2, if user is already logged in then they can access those two pages otherwise it should go to login page.
 
Now if user clicked page1 and he is not logged in, then it should go to login page, and after login successful, page1 should display not home page.
 
Now if user clicked page2 and he is not logged in, then it should go to login page, and after login successful, page2 should display directly, not home page or page1 page.
 
Means the page from which he got redirected to login page, the same page should display after login.
 
Help me out.
Thanks 

Answers (4)