Exemplo n.º 1
0
        protected void btnCreateUser_Click(object sender, EventArgs e)
        {
            bool      Success;
            ArrayList uservalueList = new ArrayList();

            uservalueList.Add(tbxEmailAddress.Text);
            uservalueList.Add(tbxFirstName.Text);
            uservalueList.Add(tbxLastName.Text);
            uservalueList.Add(tbxPassword1.Text);
            uservalueList.Add(tbxPassword2.Text);
            uservalueList.Add(roleList.Text);
            try
            {
                Success = UserIdentity.CreateUser(Server, uservalueList);
            }
            catch (Exception ex)
            {
                //log ex
                Success = false;
            }
            if (Success == true)
            {
                Server.Transfer("~/Default.aspx");
            }
            else
            {
                //error message
            }
        }