说明:本文实例讲述了asp.net计算每个页面执行时间的方法。分享给大家供大家参考。具体分析如下:
这里的asp.net代码可实现计算每个页面的执行时间,无需要修改页面的相关代码,这段代码会给所有的页面统一加上执行时间显示
public class PerformanceMonitorModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.PreRequestHandlerExecute += de <weixin_38715772> 上传 | 大小:34kb
说明:使用OleDBCommand相关操作类需要引入System.Data.OleDb命名空间。
通过连接一个带密码的access数据库 读取其中的数据并置入表格中显示,验证连接和命令使用正确性。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.D <weixin_38631389> 上传 | 大小:38kb