How to keep RETURNURL when accessing a secure page, yet disable it when logging in explicitly ?

I have a loginstatus control on my masterpage so that a user would have the ability to login no matter what page of the website he is on.  When he clicks on that, it brings him to the login page with the login control.  I explicitly hardcoded a specific page for the destinationpageurl attribute of the login control, but it seems the returnurl overrides that setting.  It seems the returnurl is set for the page I was previously on.  Why is the returnurl being set if I wanted to just login explicitly?  How would the hardcoded destinationpageurl ever get a chance to work then?

However, the returnurl is very useful to me in other situations.  For example, say an unauthenticated user is browsing the site and he clicks on a button (or link or whatever) that leads to a secure page (all of my secure pages are under a folder allowing only authenticated users to view them).  The site directs him automatically to the login page with the returnurl instructing the site to forward him to the intended destination after successful login.  This is desirable.  However, as stated earlier, when a user explicitly clicks on the loginstatus to log in, I want him to be directly led to a specfic page (like myaccount.aspx or something).

How do I do this?

Thanks in advance.

Read More

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s