Automatically Redirecting a User to the Referring Page
When you successfully log in from the
Login.aspx page, you automatically are redirected back to the original page you requested. The
CreateUserWizard control, on the other hand, does not redirect you back anywhere. If you want the
CreateUserWizard control to work in the same way as the
Login control, you need to write some code.
Login control in Listing 26.19 includes a link to a user registration page named
CreateUserWizardReturn.aspx. In the
Page_Load() event handler, the value of the
ReturnUrl query string parameter is added to the link to the registration page.
Before you use the page in Listing 26.19, you need to rename the page to
Login.aspx. If ...