Question

If I drop a System.Web.UI.WebControls.Login onto a page, should it redirect to the ReturnURL by default? Or do I have to set some config settings or write some code to make this work?

Was it helpful?

Solution

Short answer: No.

If you do not specify a value for the DestinationPageUrl property, the user will be redirected to the original page the user requested after successfully logging in.

Full MSDN source

According to this blog post, it apparently also factors in whether the page with the login control is the LoginURL specified in web.config. It states:

If page is not defined as Login page in configuration file, ReturnUrl parameter is ignored completely.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top