示例#1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        adminBL admin    = new adminBL();
        string  password = FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox2.Text, "MD5");

        if (admin.admin_add(TextBox1.Text, password, TextBox4.Text, Convert.ToInt32(DropDownList1.SelectedValue)) > 0)
        {
            TextBox2.Text = "";
            TextBox1.Text = "";
            TextBox4.Text = "";
            DropDownList1.SelectedIndex = 0;
            Response.Write("<script>alert('新增成功');</script>");
        }
    }