浩浩 [程序人生]

     时光在一行行代码中悄然流逝。。。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
using System;
using System.Web;

namespace cnblogs
{
    /// <summary>
    /// Summary description for DownloadCountModule
    /// </summary>
    public class DownloadCounterModule : IHttpModule
    {
        public DownloadCounterModule()
        {     
        }

        #region IHttpModule Members

        public void Dispose()
        {

        }

        public void Init(HttpApplication context)
        {
            context.PreSendRequestContent += new EventHandler(context_PreRequestHandlerExecute);
        }

        void context_PreRequestHandlerExecute(object sender, EventArgs e)
        {
            HttpApplication app = (HttpApplication)sender;
            HttpContext context = app.Context;
            string url = context.Request.RawUrl;
            //文件下载统计代码
        }

        #endregion
    } 
}
posted on 2008-12-10 23:15  paul001  阅读(168)  评论(0编辑  收藏  举报