regist.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class regist : System.Web.UI.Page
{
db DB = new db();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
this.yonghuming.Text = "";
this.mima.Text = "";
this.querenmima.Text = "";
}
}
protected void registbotton_Click(object sender, EventArgs e)
{
string strsql = "select * from d_users where username='" + this.yonghuming.Text.Trim() + "'";
ds = DB.mydata(strsql);
try
{
if (ds.Tables[0].Rows.Count != 0)
{
Response.Write("<script>alert('用户名已存在!')</script>");
}
else
{
string string1 = "insert into d_users(username,password,email,sex,regdate,QQ,IDCARD,Address,Telephone,Postcode) values('" + this.yonghuming.Text + "','" + this.querenmima.Text + "','" + this.mail.Text + "','" + this.DropSex.SelectedItem.Text + "','" + DateTime.Now + "' ,'" + this.QQ.Text + "','" + this.idcard.Text + "','" + this.address.Text + "','" + this.telphone.Text + "','" + this.code.Text + "')";
bool i = DB.UpdateDataBySql(string1);
if (i)
{
Response.Write("<script>alert('用户注册成功');location='Login.aspx'</script>");
}
else
{
Response.Write("<script>alert('用户注册失败')</script>");
}
}
}
catch (Exception)
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
