简体   繁体   中英

how to add global.asax

I'm trying to add global.asax to my project. When I'm using this way:

  1. Open Solution Explorer.
  2. Right-click on the project.
  3. Add New Item.
  4. VB or C#
  5. Web.
  6. General.
  7. Global Application Class.

there is no such options like Global Application Class

When I'm trying this way:

  1. Create an empty new project.
  2. Go to that folder and copy the Global.asax file.
  3. Go to your project and in solution explorer paste it on root.
  4. Open Global.asax file and change namespace match to your namespace.
  5. In solution explorer right click on Global.asax and pick View Markup and change inherits match to your namespace.

there is no View Markup option. any idea what I'm doing wrong?

1-)创建空的新项目2-)将新项目中的Global.asax文件复制到3-)转到您的项目中,并在解决方案资源管理器中将其通过roo 4-)打开Global.asax并将名称空间更改为项目名称空间

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM