Where are the codes in Global.asax in mvc3?

I create a default project in mvc3 and published it on my host, what about the codes in the file: Global.asax, after publishing, there is one line code in it: where are the codes?

รฏยปยฟ<%@ Application Codebehind="Global.asax.cs" Inherits="MvcApplication1.MvcApplication" Language="C#" %> 
-1
source share
2 answers

The code is in Global.asax.cs . In Visual Studio, if you look next to the Global.asax file in the object explorer, a down arrow will appear. If you click this, you will see the Global.asax.cs file. And like any other file in VS, you can double-click it, and it should open this file containing your code.

+4
source

ASP.NET MVC uses the default web application mode compared to a website. A web application is compiled mode. This means that when you send all the source code, it is removed and compiled into assemblies. Thus, you only deploy assemblies (int the bin ) and views. Thus, the Global.asax.cs file that you have during development is simply compiled into the bin/YouAppName.dll and references the Global.asax markup file.

+1
source

Source: https://habr.com/ru/post/1436248/


All Articles