ASP. NET MVC----Instance Learning

Source: Internet
Author: User

To create an empty project

Add--Global application class Global.asax, such as:

The Global.asax file (also known as an ASP. NET application file) is an optional file that

The file contains code that responds to the application-level and session-level events raised by the ASP.

The Global.asax file resides in the root directory of your ASP.

At run time, the Global.asax is parsed and compiled into a dynamically generated. NET Framework class that derives from the HttpApplication base class.

Create an ASP. NET MVC

Open global.asax, such as:

Arearegistration class

Provides a way to register one or more zones within an ASP. NET MVC application.

When you add a zone to an ASP. NET MVC application, Visual Studio creates a file named Arearegistration.

The file contains classes derived from Arearegistration.

This class defines the AreaName property and the Registerarea method, which registers the routing information for the new zone.

The Global.asax file contains the RegisterRoutes method that will be called when the ASP. NET MVC application starts.

Globalfiltercollection class

Represents a class that contains all global filters

The global filter will run for each operation of each controller. You can register a global filter by using the filters static registration endpoint

Globalfilters class

Represents a global filter collection

RouteCollection class

Provides a collection of routes for ASP.

Bundlecollection class

Contains and manages the set of registered bundle objects in an ASP.

Bundle class

Represents a series of file references to be bound together as a single resource.

The Stylebundle class represents a binding that performs a narrowing of the CSS

Static container class for the Bundletable class default binding collection

Bundletable.bundles property gets the default binding collection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.