Link to home
Start Free TrialLog in
Avatar of websss
websssFlag for Kenya

asked on

CreateUserWizardControl - how to exit and display error

Hi

I have a CreateUserWizard control which is highly customised

On this void:
 protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)
    {

Open in new window


I want to call another void called checkAuthorisedEmployeeNumber

    void checkAuthorisedEmployeeNumber(string EmpNo) { 
    
        if (EmpNo == "123456"){
            //user not allowed to register
            //exit the create user wizard and show error message
            
        }

    }

Open in new window


This is working, but i want to cancel the createUser process and show an error message saying that the user isn't in the authorised list, and cannot register

Can someone help with this code please
ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial