How to use returnUrl in query string if no user is logged-in?

Posted by Rajendra.prasad under ASP.NET on 6/14/2011 | Points: 10 | Views : 2589 | Status : [Member] | Replies : 1
how to use returnulr in query string if no user is logged-in with any particular url and redirect to login page where query string will be holding the url path of the page and once successfully logged in, redirect to the particular page.



Posted by: Ndebata on: 6/14/2011 [Member] Starter | Points: 25

Hi Rajendra,
Generally returnurl is used, to redirect the user to the page where user either requested login page or it can be a restricted page where url has been directly entered by the user which require user must login.
Generally on page init you have to check whether user has logged in or not
if no then redirect to login page with query string having information regarding the current page. ( You have to redirect to this url after login)

Then after login check any return url is there or not.

Rajendra.prasad, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response