注册页面所涉及的知识

        注册页面所涉及的知识

       string pwd1 = txtPassWord1.Text;

        string pwd2 = txtPassWord2.Text;
        if (pwd1 != pwd2)
        {
            LblMsgShowError.Visible = true;
            LblMsgShowError.Text = "密码不一致!";
            return;

        }

        //匹配正则表达式

        Regex r = new Regex(@".+@+.");
        if (!r.IsMatch(lblEmail.Text))
        {
            LblMsgShowError.Visible = true;
            LblMsgShowError.Text = "邮箱格式不一致!";
            return;      
        }
        T_UserTableAdapter adapter = new T_UserTableAdapter();
        if (adapter.GetDataByUserName(txtUserName.Text).Count > 0)
        {
            LblUserNameError.Visible = true;

            LblUserNameError.Text = "此用户名已经存在";

        }

         //  通过插入得到插入自动增长的id

        long userId =Convert.ToInt64(adapter.InsertUser(this.txtUserName.Text,this.txtPassWord1.Text,txtEmail.Text));

        JQuery判断密码强度

      

原文地址:https://www.cnblogs.com/wangyhua/p/4050683.html