Exemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Userinfo us = new Userinfo();

        if (us.checkname(TextBox1.Text))
        {
            Response.Write("<script>alert('该用户已存在,无法添加');</script>");
        }
        else
        {
            us.createUser(TextBox1.Text);
            Response.Redirect("usermng.aspx");
        }
    }