Saltar apartados

Project ASP.NET MVC Framework

When it creates a project of MVC of application web ASP.NET, the components of MVC separate in function of the folders of project that show in the following illustration:

Estructura de un proyecto básico en ASP.NET MVC 2

Of form predetermined, the projects of MVC include the following folders:

  • Content, folder where stores the static content of the application. Generally they lodge the leaves of style, the images, etc.
  • Controllers, folder where stored the controllers. The frame of MVC requires that the names of all the controllers finish with "Controller", as HomeController, CatalogadorController or UsuariosController.
  • Models, folder where stored the classes that represent the models that will use in our application.
  • Scripts, folder where lodge all the files javascript that need in our application. By defect already find a group of files that will use for the calls AJAX and the library of jQuery (that it is the one who uses by Visual defect Studio).
  • Views, that is the location recommended for the sights.

The sights use files ViewPage (.aspx), ViewUserControl (.ascx) And ViewMasterPage (.master), in addition to other files related with the representation of sights.

The folder Views will contain a lot of folders, at least so many like controllers. Al generate a sight create a folder with the name of the controller (removing the word "Controller", and to his time inside this, will create so many files like actions have the controller.

Inside the folder Views found us of a folder designated Shared that will use to lodge all that that was common for all the controllers. For example we can place the master pages, can lodge ViewUserControl common. All this will see it with detail in the section of staff,

Additional folders that go to create

  • ViewsModel, is a folder that will create manualmente to create classes that integrate conjoint of models in calls to sights.
  • Helpers, is a folder that will create to situate the staff for the sights.

Special files

As in all application ASP.NET, has of two folders for configuration and definition of the application; Global.asax And Web.config.

The novelty is that the Global file.asax Will use it to define the enrutamiento of the directions URL.

Computing service ASP.NET MVC 2 Framework

Universidad de Alicante
Carretera de San Vicente del Raspeig s/n
03690 San Vicente del Raspeig
Alicante (Spain)

Tel: (+34) 96 590 3400

Fax: (+34) 96 590 3464

For further information:, and for enquiries on this web server:

Carretera San Vicente del Raspeig s/n - 03690 San Vicente del Raspeig - Alicante - Tel. 96 590 3400 - Fax 96 590 3464