Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
SQL Query
SharePoint Interview
general knowledge
 :) Hot Jobs
 :) Latest Articles


Define MVC Project Structure
Classified Posted on 08 Nov 2011

Home >> DotNet >> ASP.NET >> Define MVC Project Structure

Below is default structure of MVC 2 asp.net application below screen helps you to get this. In below screen i have not use unit test server if we choose unit test server it will add application.tests.


Detail of above project folder:-
(1)App_Data is a physicaly storage for data and this folder has the same role as it does in ASP.NET Web sites that use Web Forms pages.

(2)Content folder recommended location to add content files such as images, CSS files and so on. Content folder is for static files.

(3)Controllers folder recommended location for controllers. Here MVC framework requires the names of all controllers to end with "Controller" for example s HomeController, LoginController, ProductController etc.

(4)Models folder in MVC is provided for classes which represent the application model for your MVC Web application. Model folder usually includes code that defines objects and that defines the logic for interaction with the data store. Model objects will be in separate class libraries. But when we create a new application we might put classes here and then move them into separate class libraries at a later point in the development cycle.

(5)Scripts ismainly used to recommended location for script files that support the application. But by default this folder contains ASP.NET AJAX foundation files and the jQuery library.

(6)Views folder recommended the location for views. Views use ViewPage (.aspx), ViewUserControl (.ascx), and ViewMasterPage (.master) files, in addition to any other files that are related to rendering views. The Views folder contains a folder for each controller; the folder is named with the controller-name prefix. For example, if you have a controller named HomeController, the Views folder contains a folder named Home. By default, when the ASP.NET MVC framework loads a view, it looks for a ViewPage (.aspx) file that has the requested view name in the Views\controllerName folder. By default, there is also a folder named Shared in the Views folder, which does not correspond to any controller. The Shared folder is used for views that are shared across multiple controllers. For example, you can put the Web application's master page in the Shared folder.

Top Searches:asp net questions vb net questions sql query uddl questions class javascript sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |