源代码/KaoShi.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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.Text.RegularExpressions;
public partial class KaoShi : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string stype = Request.QueryString["ID"].ToString();
string DanXun = "select top 10 * from TB_TiKu where LeiXing='单选' and Type='"+stype+"'";
DataSet ds = DBHelper.GetDataSet(DanXun);
this.GridView1.DataSource = ds;
this.GridView1.DataBind();
string DuoXuan = "select top 10 * from TB_TiKu where LeiXing='多选' and Type='" + stype + "'";
DataSet ds1 = DBHelper.GetDataSet(DuoXuan);
this.GridView2.DataSource = ds1;
this.GridView2.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
double FenShu = 0.0;
//单选
#region
foreach (GridViewRow dr in GridView1.Rows)//对单选题每题进行判断用户选择答案
{
string Answer = ((Label)dr.FindControl("Label3")).Text;
string str = "";
if (((RadioButton)dr.FindControl("RadioButton1")).Checked)
{
str = "A";
}
else if (((RadioButton)dr.FindControl("RadioButton2")).Checked)
{
str = "B";
后面还有 72 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。