資源簡介
用ASP.NET做的在線考試系統(tǒng),用戶需經(jīng)過身份驗(yàn)證,方能進(jìn)入答題庫,系統(tǒng)隨機(jī)出題,網(wǎng)上評卷,并可以立刻知道自己的成績,此系統(tǒng)緩解教師壓力。該考試系統(tǒng)是基于WEB技術(shù)系統(tǒng)開發(fā)的一種,采用B/S的三層結(jié)構(gòu)模式,使用ASP.NET動態(tài)網(wǎng)頁技術(shù)開發(fā)。不受時間和地域的限制可以隨機(jī)出題。管理員創(chuàng)建各種試題的題庫,進(jìn)行試題類別和樣式的定義,并對試題、成績、用戶等進(jìn)行處理;教師在題庫添加試題,對用戶的成績進(jìn)行管理。用戶則通過選擇不同類別的試卷,系統(tǒng)隨機(jī)生成試卷并開始考試,查詢成績。用戶使用該系統(tǒng),可以對特定學(xué)科的學(xué)習(xí)情況進(jìn)行檢測。

代碼片段和文件信息
using?System;
using?System.Collections;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Web;
using?System.Web.SessionState;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.HtmlControls;
namespace?TestOnline
{
///?
///?admin?的摘要說明。
///?
public?class?admin?:?System.Web.UI.Page
{
protected?System.Web.UI.WebControls.TextBox?tbx_oldPwd;
protected?System.Web.UI.WebControls.TextBox?tbx_newPwd1;
protected?System.Web.UI.WebControls.TextBox?tbx_newPwd2;
protected?System.Web.UI.WebControls.ImageButton?Ibtn_ok;
private?void?Page_Load(object?sender?System.EventArgs?e)
{
//?在此處放置用戶代碼以初始化頁面
if(Session[“adminId“]==null)
{Response.Redirect(“l(fā)ogin.aspx“);
}
}
#region?Web?窗體設(shè)計器生成的代碼
override?protected?void?OnInit(EventArgs?e)
{
//
//?CODEGEN:?該調(diào)用是?ASP.NET?Web?窗體設(shè)計器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
///?
///?設(shè)計器支持所需的方法?-?不要使用代碼編輯器修改
///?此方法的內(nèi)容。
///?
private?void?InitializeComponent()
{????
this.Ibtn_ok.Click?+=?new?System.Web.UI.ImageClickEventHandler(this.Ibtn_ok_Click);
this.Load?+=?new?System.EventHandler(this.Page_Load);
}
#endregion
private?void?Ibtn_ok_Click(object?sender?System.Web.UI.ImageClickEventArgs?e)
{
string?adminId=Convert.ToString(Session[“adminId“]);
string?adminPwd=tbx_oldPwd.Text.Trim();
string?newPwd1=tbx_newPwd1.Text.Trim();
string?newPwd2=tbx_newPwd2.Text.Trim();
if(newPwd1==““||newPwd2==““)
Response.Write(“ript>alert(\“密碼不能為空\“); ript>“);
else
{
int?count=(new?projClass()).getAdmin(adminIdadminPwd);
if(count==0)
{
Response.Write(“ript>alert(\“密碼錯誤!請重新輸入\“); ript>“);
}
else
{
if(!newPwd1.Equals(newPwd2))
Response.Write(“ript>alert(\“兩次密碼不一致!請重新輸入!\“); ript>“);
else
{
int?count1=(new?projClass()).updateAdminPwd(adminIdnewPwd1);
if(count1==1)
Response.Write(“ript>alert(\“密碼修改成功!\“); ript>“);
else??Response.Write(“ript>alert(\“更新失敗!\“); ript>“);
}
}
}
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5867??2009-06-02?11:08??TestOnline\about.htm
?????文件???????1329??2008-05-30?14:09??TestOnline\admin.aspx
?????文件???????2350??2008-05-29?22:12??TestOnline\admin.aspx.cs
?????文件???????5317??2008-05-29?22:12??TestOnline\admin.aspx.resx
?????文件???????1635??2006-02-26?14:51??TestOnline\adminfr
?????文件???????3003??2008-05-30?14:11??TestOnline\adminInfo.aspx
?????文件???????2985??2006-02-16?01:51??TestOnline\adminInfo.aspx.bak
?????文件???????1756??2008-05-29?22:14??TestOnline\adminInfo.aspx.cs
?????文件???????5317??2008-05-29?22:14??TestOnline\adminInfo.aspx.resx
?????文件???????2115??2006-01-02?18:38??TestOnline\AssemblyInfo.cs
?????文件??????98304??2008-05-29?22:48??TestOnline\bin\TestOnline.dll
?????文件?????226816??2008-05-29?22:48??TestOnline\bin\TestOnline.pdb
?????目錄??????????0??2008-06-12?10:14??TestOnline\bin
?????文件????????634??2005-12-23?03:05??TestOnline\btn_finish_1.gif
?????文件???????3068??2008-05-30?14:12??TestOnline\courseView.aspx
?????文件???????5050??2008-05-29?22:18??TestOnline\courseView.aspx.cs
?????文件???????5317??2008-05-29?22:18??TestOnline\courseView.aspx.resx
?????文件???????3838??2008-05-30?14:15??TestOnline\createTest.aspx
?????文件???????7764??2008-05-29?22:18??TestOnline\createTest.aspx.cs
?????文件???????7734??2006-02-24?19:34??TestOnline\createTest.aspx.cs.bak
?????文件???????5317??2008-05-29?22:18??TestOnline\createTest.aspx.resx
?????文件????1310720??2008-06-02?22:39??TestOnline\DB\TestOnline_Data.MDF
?????文件????3538944??2008-06-02?22:39??TestOnline\DB\TestOnline_Log.LDF
?????目錄??????????0??2008-06-12?10:14??TestOnline\DB
?????文件?????????77??2006-01-02?18:38??TestOnline\Global.asax
?????文件???????1376??2006-01-02?18:38??TestOnline\Global.asax.cs
?????文件???????1733??2002-01-30?13:04??TestOnline\Global.asax.resx
?????文件???????1452??2005-08-10?21:57??TestOnline\images\adsf.jpg
?????文件????????189??2005-12-23?03:05??TestOnline\images\btn_allchoose_1.gif
?????文件????????188??2005-12-23?03:05??TestOnline\images\btn_allclean_1.gif
............此處省略115個文件信息
評論
共有 條評論