Exemple #1
0
    protected void gvstudent_RowCommand(object sender,GridViewCommandEventArgs e)
    {
        if (e.CommandName == "change_Password")
        {
            string email = e.CommandArgument.ToString();
            hfEmailID.Value = email;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "Func_PopUp()", true);
        }
        if (e.CommandName == "remove_Student")
        {
            string email = e.CommandArgument.ToString();
            hfEmailID.Value = email;
            if (!string.IsNullOrEmpty(hfEmailID.Value))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('Are you sure you want to delete the role');</script>");
                clsStudent cs = new clsStudent();
                cs.removeStudent(email);
                Membership.DeleteUser(email);
                bindstudentgrid();

            }
        }
    }