ASP.NET MVC 4应用程序文件夹

简介: App_Start It has configuration classes to reduce clutter code in the Global.asax 它包含了配置类来减少在Global.asax中的杂乱代码 Application_Start 方法 App_Start 文件夹里有如下文件:AuthConfig.cs: Related to security settings, including sites for OAuth login. 关于安全设置,包含网站的授权登录。

App_Start

It has configuration classes to reduce clutter code in the Global.asax

它包含了配置类来减少在Global.asax中的杂乱代码

Application_Start 方法

App_Start 文件夹里有如下文件:

AuthConfig.cs: Related to security settings, including sites for OAuth login.

关于安全设置,包含网站的授权登录。

BundleConfig.cs: Related to register bundles for the bundling and minification

有关用于捆绑和微小的注册

FilterConfig.cs: To register global MVC filters.(by default HandleErrorAttribute is registered)

用来注册全局MVC过滤。(默认HandleErrorAttribute是已注册的)

RouteConfig.cs: Related to MVC Route configuration

有关MVC路由的配置

WebApiConfig.cs: Used to register Web API routes and configuration settings.
用于注册Web API路由和配置设置。

Also, this folder helps to use nuget packages that use Application_Start code, without touching Global.asax.cs.
同样,这个文件夹帮助NuGet包使用Application_Start代码儿不接触Global.asax.cs。

Areas

An MVC structure inside the application to partition our web application into smaller parts.

一个MVC架构在应用程序分割我们的web应用成较小的部分。

Content

To put CSS and other static contents

存放CSS和其他静态目录

Controllers

Contains the controller classes

包含控制类

Images

For images, It is being referenced from the Content\Site.css by default.

针对Imanges文件夹,它默认被从Content\SIte.css引用。

Models

Contains view model and domain model classes.

包含视图模型和域模型类

Scripts

Stores all JavaScript libraries and files

存储所有的Javascript库和文件

Views

Related to the display of the application (UI).

关于应用程序界面的显示

/Views/Shared

This directory holds layouts (master-page in-terms of web forms) and views which is used to store views shared between controllers 

这个目录掌握着布局(web表单的主页)和被用于在控制类之间存储视图共享的视图

/Views/[FolderName]

Views or Partial Views specific to that folder or single controller like Account folder is specific to Account controller for registering and logging in to user accounts.

视图或者Partial视图针对文件夹或者单个控制,像Account文件夹是针对Account控制类用来注册和打印用户账号的日志。

目录
相关文章
|
3月前
|
开发框架 前端开发 .NET
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
ASP.NET CORE 3.1 MVC“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决过程
38 0
|
4天前
|
开发框架 前端开发 JavaScript
采用C#.Net +JavaScript 开发的云LIS系统源码 二级医院应用案例有演示
技术架构:Asp.NET CORE 3.1 MVC + SQLserver + Redis等 开发语言:C# 6.0、JavaScript 前端框架:JQuery、EasyUI、Bootstrap 后端框架:MVC、SQLSugar等 数 据 库:SQLserver 2012
|
30天前
|
开发框架 前端开发 .NET
进入ASP .net mvc的世界
进入ASP .net mvc的世界
28 0
|
30天前
mvc.net分页查询案例——mvc-paper.css
mvc.net分页查询案例——mvc-paper.css
5 0
|
1月前
|
存储 设计模式 前端开发
请解释 Web 应用程序的 MVC(模型-视图-控制器)架构。
【2月更文挑战第26天】【2月更文挑战第89篇】请解释 Web 应用程序的 MVC(模型-视图-控制器)架构。
|
1月前
|
开发框架 前端开发 .NET
C# .NET面试系列六:ASP.NET MVC
<h2>ASP.NET MVC #### 1. MVC 中的 TempData\ViewBag\ViewData 区别? 在ASP.NET MVC中,TempData、ViewBag 和 ViewData 都是用于在控制器和视图之间传递数据的机制,但它们有一些区别。 <b>TempData:</b> 1、生命周期 ```c# TempData 的生命周期是短暂的,数据只在当前请求和下一次请求之间有效。一旦数据被读取,它就会被标记为已读,下一次请求时就会被清除。 ``` 2、用途 ```c# 主要用于在两个动作之间传递数据,例如在一个动作中设置 TempData,然后在重定向到另
95 5
|
3月前
|
XML 前端开发 定位技术
C#(NET Core3.1 MVC)生成站点地图(sitemap.xml)
C#(NET Core3.1 MVC)生成站点地图(sitemap.xml)
25 0
|
3月前
|
前端开发
.net core mvc获取IP地址和IP所在地(其实是百度的)
.net core mvc获取IP地址和IP所在地(其实是百度的)
123 0
|
前端开发 数据安全/隐私保护
net MVC中的模型绑定、验证以及ModelState
net MVC中的模型绑定、验证以及ModelState 模型绑定 模型绑定应该很容易理解,就是传递过来的数据,创建对应的model并把数据赋予model的属性,这样model的字段就有值了。
1653 0
|
8月前
|
存储 开发框架 前端开发
[回馈]ASP.NET Core MVC开发实战之商城系统(五)
经过一段时间的准备,新的一期【ASP.NET Core MVC开发实战之商城系统】已经开始,在之前的文章中,讲解了商城系统的整体功能设计,页面布局设计,环境搭建,系统配置,及首页【商品类型,banner条,友情链接,降价促销,新品爆款】,商品列表页面,商品详情等功能的开发,今天继续讲解购物车功能开发,仅供学习分享使用,如有不足之处,还请指正。
114 0

相关实验场景

更多