I have set up an asp registration page with a custom asp:CreateUserWizard feature.
After the successful completion of registration (for example, RegisterUser_CreatedUser), I would like to redirect the user to another page such as a welcome screen. I also want to open a new window with the login page somehow (perhaps by using Response.Redirect(URL);
). Is it possible to popup a screen from an external URL using this approach, or is there a better way to achieve this?
I attempted to create a custom button that triggers this JavaScript function for registration:
function redirectAfterRegister() {
Page_ClientValidate();
if (Page_IsValid) {
window.open('/Account/Login.aspx?UserCreated=True');
$('#CreateUserButton').click();
}
return false;
}
The pop-up does work when called upon clicking, but the issue is that the pop-up always appears even if the user creation was unsuccessful, which is not ideal.
Any assistance on this matter would be greatly appreciated.