⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zhuce.aspx.cs

📁 书本的源代码。可以用的在线考试系统。在vs平台上测试成功
💻 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 + -