📄 zhuce.aspx.cs
字号:
using 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;
using System.Data.SqlClient;
public partial class zhuce : System.Web.UI.Page
{
Datacon dataconn = new Datacon();
protected void Page_Load(object sender, EventArgs e)
{
dataconn.ecDropDownList(ddlProfession, "select * from tb_Profession", "Name", "ID");
}
protected void Button3_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
dataconn.eccom("insert into tb_Student"
+"(ID,Name,PWD,question,answer,Sex,profession)"
+"values('" + this.txtStuID.Text + "','" + this.txtStuName.Text + "','"
+ this.txtStuPwd.Text + "','" + this.txtQuePwd.Text + "','"
+ this.txtAnsPwd.Text + "','" + this.ddlSex.Text + "','"
+ Request["DropDownList2"] + "')");
Response.Write("<script lanuage=javascript>alert('您已经注册成功,欢迎使用该系统!');location='javascript:history.go(-1)'</script>");
}
protected void Button2_Click(object sender, EventArgs e)
{
txtStuID.Text = "";
txtStuName.Text = "";
txtStuPwd.Text = "";
txtStuFPwd.Text = "";
txtQuePwd.Text = "";
txtAnsPwd.Text = "";
txtStuID.Focus();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -