Reg.aspx.cs
(完整代码) 1KBusing System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class UserStReg : System.Web.UI.Page
{
SqlHelper data = new SqlHelper();
protected void Page_Load(object sender, EventArgs e)
{
this.Title = "二手汽车网上销售系统";
}
protected void Button1_Click(object sender, EventArgs e)
{
if (data.GetDs(" select * from Users where UserName='"+txtname.Text+"'", "abc").Tables[0].Rows.Count > 0)
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('用户名存在,请重新选择其他用户名!');", true);
return;
}
data.RunSql("insert into Users(emal,UserName,Sex,Age,Ds,pwd,XingMing,Photo,Tel,Address)values('" + txtemal.Text + "','" + txtname.Text + "','" + DropDownList1.SelectedItem.Text + "','" + Age.Text + "','" + txtds.Text + "','" + TextBox1.Text + "','" + XingMing.Text + "','" + pic.Text + "','" + Tel.Text + "','" + Address .Text+ "')");
Alert.AlertAndRedirect("注册成功!", "Default.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
string res;
upload up = new upload();
res = up.Up(file1, "files/");
this.Label1.Visible = true;
this.Label1.Text = up.Resup[Convert.ToInt32(res)];
this.pic.Text = up.s;
Image1.ImageUrl = "files/" + pic.Text;
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。