Ejemplo n.º 1
0
        protected void btnAddRecord_Click(object sender, EventArgs e)
        {
            string userName       = txtUserName.Text;
            string password       = txtPassword.Text;
            string primaryEmail   = txtPrimaryEmail.Text;
            string secondaryEmail = txtSecondaryEmail.Text;
            int    roleID         = Convert.ToInt32(txtRole.Text);


            u.RegisterUser(userName, password, primaryEmail, secondaryEmail, roleID);


            BindGrid();

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(@"<script type='text/javascript'>");
            sb.Append("alert('Record Added Successfully');");
            sb.Append("$('#addModal').modal('hide');");
            sb.Append(@"</script>");

            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddHideModalScript", sb.ToString(), false);
        }