当前位置: 代码迷 >> ASP.NET >> 为啥global.asax只有两个方法
  详细解决方案

为啥global.asax只有两个方法

热度:7524   发布时间:2013-02-25 00:00:00.0
为什么global.asax只有两个方法
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.IO;
using System.Text;

namespace ZC
{
  public class Global : System.Web.HttpApplication
  {

  protected void Application_Start(object sender, EventArgs e)
  {
   
  }
   

  protected void Application_End(object sender, EventArgs e)
  {
   
  }
  }
}

------解决方案--------------------------------------------------------
你可以根据需要自行加入,如果没有global.asax文件,应用程序将对所有事件应用由 HttpApplication类提供的默认行为。

------解决方案--------------------------------------------------------
可自己添加啊 比如Session的
------解决方案--------------------------------------------------------
自己加上去就行了,最好用“添加新项”中选择全局文件。
  相关解决方案