易截截图软件、单文件、免安装、纯绿色、仅160KB

Asp.Net 简单考题管理系统


default.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.IO;
namespace Web0531
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
db.dataBind(ListView1, "select * from exam order by id");
try
{
int PageSize = (int)Session["PageSize"]; // 保证从修改页面能返回到原来的页面
int StartRowIndex = (int)Session["StartRowIndex"];
((DataPager)ListView1.FindControl("DataPager1")).SetPageProperties(StartRowIndex, PageSize, true);
}
catch { }
}
}
// 数据项绑定后,将正确答案的选项“蓝色、加粗”显示
protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
{
try
{
Label lb = (Label)e.Item.FindControl("answerLabel"); // 取答案
string ans = lb.Text.Trim() + "Label"; // 如果答案是a;b;c;d其中之一
Label lbans = (Label)e.Item.FindControl(ans); // 没有答案时会出错
lbans.CssClass = "bb"; // 设置答案选项的样式
}
catch { }
}
// 翻页时执行
protected void ListView1_PagePropertiesChanged(object sender, EventArgs e)
{
int PageSize = ((DataPager)ListView1.FindControl("DataPager1")).PageSize; // 每页记录数
int StartRo


相关文档:

近期作品 asp.net网页版斗地主(未完待续)

首先申明 纯属个人练习之作 请勿用于商业目的..........无语
纪念一下我以前的一个作品<窥>,以后就用它当我的LOGO了
今天是首发,这篇文章我会持续更新,我参照了园区里前辈的经验,摸索着去实现,目前大体的还未完善,先发张图上来...
......

[ASP.net]学习asp.net的完整流程

本贴来自ZDNetChina中文社区 http://bbs.zdnet.com.cn/
本贴地址:http://bbs.zdnet.com.cn/viewthread.php?tid=108315
 
如果你已经有较多的面向对象开发经验,跳过以下这两步:
  第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是 ......

Asp.net 打印web 网页 如何不显示 网址 页码


1.对IE浏览器进行设置
 文件-〉页面设置-〉将里面的页眉和页脚的内容清空 就OK了
2.页面代码实现 Javascript
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><!--  & ......

apss asp.net C# web 定时执行程序

using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Timers;
using System.Data;
using System.Data.SqlClient;
namespace SMS_joke
{
/// <summary>
/// Global 的摘要说明。
/// </summary>
public class ......

ASP.NET"正在中止线程"错误原因

PRB:在使用 Response.End、Response.Redirect 或 Server.Transfer 时出现 ThreadAbortException
症状
如果使用 Response.End、Response.Redirect 或 Server.Transfer 方法,将出现 ThreadAbortException 异常。您可以使用 try-catch 语句捕获此异常。
原因
Response.End 方法终止页的执行,并将此执行切换到应用程序 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号