ASP.NET古董鉴赏管理网站(8)

来源:xiaoniu168.com 作者:本站原创 添加时间:2012-01-05 点击数:21415

计算机毕业设计用户注册功能介绍:

5.5  用户注册
此模块主要是提供新用户信息注册。用户注册信息时,判断用户名,输入的密码和确认密码是否一致。然后输入密码、确认密码、电话、联系地址、身份证号等,注册和返回操作。

以下是引用片段:

核心代码如下:
        protected void btnZC_Click(object sender, EventArgs e)
    {
        ////判断信息是否正确
        if (this.txtUName.Text.Trim() == "")
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "ert('用户名不能为空!');");
            return;
        }
        if (this.txtPwd.Text.Trim() != this.txtQRPwd.Text.Trim())
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "alt('密码不一致!');");
            return;
        }
        if (DataBase.Get_Table("select * from 会员信息 where 会员名='" + txtUName.Text.Trim() + "'").Rows.Count > 0)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "ert('会员名重复!');            return;
        }
        DataBase.ExecSql("INSERT INTO [会员信息] ( [会员名] ,[密码] ,[联系地址] ,[电话] ,[Email] ,[身份证号] ) VALUES ('" + txtUName.Text + "','" + txtPwd.Text + "','" + txtLXDZ.Text + "','" + txtDH.Text + "','" + txtEmail.Text + "','" + txtSFZH.Text + "')");


        Session["User"] = this.txtUName.Text.Trim();

        if (Request.QueryString["Tag"] == "I")
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "aert('保存成功!');window.location.href='Index.aspx';");
        }
        if (Request.QueryString["Tag"] == "H")
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "ino", "aert('保存成功!');window.location.href='index_History.aspx';");
        }
        if (Request.QueryString["Tag"] == "P")
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "alrt('保存成功!');window.location.href='index_Person.aspx';
");
        }
    }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第9页为计算机毕业论文信息展示功能介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网