Redirect start page based on user role?


D

dgk

I'm trying to redirect the user using the built-in authentication
(ASP.Net 2) and it looks like the correct place would be the LoggedIn
event of the Login control. But apparently the user and roles aren't
available yet. At least in VB, the My.User.IsInRole fails there.

If I check at the page load of the start page it works ok, but I
figured that it would be cleaner just setting the DestinationPageUrl
property of the login form.

Is there a better way to handle this?
 
Ad

Advertisements

S

sloan

I think you might try a

FindTheFork.aspx
page.

Set the desitinationPageURL there, and then put your logic in the
FindTheFork.cs file to.... figure out where to do.
 
Ad

Advertisements

D

dgk

I think you might try a

FindTheFork.aspx
page.

Set the desitinationPageURL there, and then put your logic in the
FindTheFork.cs file to.... figure out where to do.

That's sort of what I did. I just set a session variable to indicate
that it's the first pass and in the default page load I check the user
to see where they should be sent. I figured that there might be a more
elegant way, but it works fine.
 

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