📄 exerciselogin.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;
public partial class Students_exerciselogin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager1.RegisterAsyncPostBackControl(lbCourse);
//ScriptManager1.RegisterAsyncPostBackControl(lbExam);
if (!Page.IsPostBack)
{
//------------------------------------------------------------
string strCheck = "exercise";
if (Session["checkUser"].ToString() != strCheck.ToString())
{
Response.Redirect("login.aspx");
}
//----------------------------------------------------------
btnSubmit.Attributes.Add("onclick", "return ifSelect()");
(new ExamOnline.Exam()).bindListBox(lbCourse, "0");
}
}
protected void lbCourse_SelectedIndexChanged(object sender, EventArgs e)
{
string cid = lbCourse.SelectedValue.ToString();
lbExam.Items.Clear();
(new ExamOnline.Exam()).bindListBox(lbExam,cid);
UpdatePanel1.Update();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
if(lbExam.SelectedIndex != -1)
{
int paper_id = Convert.ToInt32(lbExam.SelectedValue);
Response.Redirect("exerciseonline.aspx?paperID=" + paper_id);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -