Reg.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using System.Data.SqlClient;
using System.Configuration;

namespace SCard
{

    public partial class Reg : System.Web.UI.Page
    {
 
        protected void Button1_Click(object sender, EventArgs e)
        {
            string DBPath = ConfigurationSettings.AppSettings["DataBasePath"];
            string connStr = (DBPath);
            SqlConnection con = new SqlConnection(connStr);
            con.Open();
            if (this.txtUserName.Text.ToString().Length == 0)
            {
                Response.Write("<script>alert('用户名称未填写')</script>");
                return;
            }
            if (this.txtPsw.Text.ToString().Length == 0)
            {
                Response.Write("<script>alert('密码不能为空')</script>");
                return;
            }

            if (this.txtPsw.Text.ToString() != txtPsw1.Text.ToString())
            {
                Response.Write("<script>alert('再次输入的密码不一致')</script>");
                return;
            }

            string UserName, Psw, 性别, 年龄, 备注, 联系方式, 真实姓名;

            UserName = this.txtUserName.Text;
            Psw = this.txtPsw.Text;
            性别 = this.dplSex.Text;
            年龄 = this.txtOld.Text;
            备注 = this.txtNode.Text;
            联系方式 = this.txtZh.Text;
            真实姓名 = this.TextBox1.Text;

            SqlCommand command = new SqlCommand("select * from tblUser where UserName='" + UserName+ "'", con);
            SqlDataReader sdr = command.ExecuteReader();
            if (sdr.Read())
            {
                Response.Write("<script>alert('用户名重复')</script>");
                sdr.Close();
                return;
后面还有 25 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。