views:

49

answers:

2

i am sending a request to ajaxhandler i want if the user is not logged in then it sends back a redirect url to login page and the page automaticaly redirects to login page after the ajaxrequest response

A: 

We do this by just passing the url along in a JSON response then just having the AJAX handler check for it and set the location, however this might pose a security issue, you might just want to send back a flag or something and keep the url on the client-side.

Lloyd
infact m looking for a direct way so that i dont need to redirect from the client side, means i the ajax handler returns a redirect url and it directly goest to dat page
vakas
i thing that if you use form authentication then you can easily redirect to a page if user not login
4thpage
@rich :sorry i cud not get u.... how to use form authentication
vakas
Means to say check the user cookie to find out he was registered or not.
4thpage
A: 

i have a idea that

sending request using json in json return the redirect url and when you get json result then redirect to specific page

4thpage