loginredirect question


B

Bobby Edward

Using built in membership....

I have a loginredirect page that redirects the user to a default page based
on the role (User.IsInRole).

Example...
If User.IsInRole("Admin") then response.redirect("admin/mypage.aspx").

When a non-valid user tries to access a "private" page, of course, it
redirects them to the login page for them to sign in.

How can I code this into the loginredirect page: If they were redirected to
the login page (when trying to access another page they didn't have access
to) and they are now validated OK, then redirect them to the page they were
trying to access before (NOT the default page)?

Thanks!
 
Ad

Advertisements

B

Bobby Edward

Actually I noticed that when there is a ReturnUrl that loginredirect code
doesn't even run. But in my loginredirect code I set some session
variables. Is there a way to always make it pass thru the loginredirect
code, regardless of how one logs in? Or do u have any other suggestions?
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top