@{ Layout = “…”}

To define layout page Equivalent to asp.net master-page

要定义相当于ASP.NET母版页的页面布局

@model <StrongModelType>

To define strongly-typed model

要定义强类型的模型

@section <name> { }

To define named section

定义命名节

@RenderBody

Used in layout as a placeholder for view’s entire content.

用于布局视图的整个内容的占位符。

@RenderPage

Renders the content of one page within another page.

将内容呈现在一个页面内的另一页。

@RenderSection

In layout pages, renders the content of a named section.

在布局页面,呈现的内容已命名的节。

IsSectionDefined

Returns a value that indicates whether the specified section is defined in the page.

返回一个值,指示是否定义在页面中指定的部分。

DefineSection

To create named content sections in content page.

创建命名在内容页的内容部分。

@helper

To define a helper which create a reusable code snippet.

要定义一个帮手创建一个可重用的代码片段。

@functions

To define a function ( pure server-side methods)that can be reused within the view.

要定义一个视图内,可重复使用的功能(纯服务器端方法)。

@ViewBag.<myData>

Dynamic property, used to pass data between a Controller and a View

用于控制器和视图之间传递数据的动态特性

@ViewData[myData]

To pass data between a Controller and a View via special Dictionary class

通过特殊的Dictionary类的一个控制器和视图之间传递数据

@tempdata

To pass State Between Action Methods

要传递操作方法之间的状态

posted on 2013-09-29 17:50  yangzhenping  阅读(127)  评论(0编辑  收藏  举报