TAILIEUCHUNG - ASP.NET 4 Unleased - p 154

Chú ý Một trong những điều tuyệt vời về ASP NET MVC. Framework là nó có thể sử dụng hầu như bất kỳ ASP NET cơ sở., Bao gồm các mô hình cung cấp toàn bộ. Điều này cho phép bạn tạo ra các ứng dụng MVC với trạng thái phiên, vai trò, thành viên, thẩm định hình thức, và nhiều hơn nữa. | 1504 CHAPTER 33 Building ASPNET MVC Applications NOTE One of the great things about ASPNET MVC Framework is that it can utilize virtually any ASPNET facility including the entire provider model. This enables you to create MVC applications with session state roles membership forms authentication and much more. The stock project structure includes some prepopulated folders Content Starting point for your site s content. By default the file starts here and you can add subdirectories for images and other media types. Controllers Where all your controllers reside. All controller classes must have a Controller postfix as shown in Figure . Models A handy starting point for all your web application models. Many enterprise applications start by deleting this folder and placing the models in a reusable class library. Scripts Where all your JavaScript resides. This folder comes prepopulated with a version of jQuery and all the scripts required to support Ajax. Views The root of the view folder hierarchy. Below this folder you can find a folder for each controller named exactly the same as that controller. For example a Views Account folder contains all the views used by the Accountcontroller class. FIGURE Stock ASPNET MVC 2 project structure in Solution Explorer. From the Library of Wow eBook Building an MVC Page 1505 Figure shows a screenshot of the stock project structure after creating a new MVC project. At this point because the default project template contains enough scaffolding for you to start you can press F5 and watch the application run. Note that the application supports forms authentication new user creation and user login out-of-the-box. Figure shows what it looks like when you run the default MVC project. FIGURE Default ASPNET MVC 2 application. 33 In the next section you create your own MVC page that shows you how MVC s internal plumbing works. Building an MVC Page This section walks you through the .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.