开发者

What's the difference style of writing in .net's MVC2,MVC3 and Razor?

开发者 https://www.devze.com 2023-03-30 11:29 出处:网络
If anybody has written application in .net\'s 开发者_如何学运维MVC2 and MVC3, there is a change of syntax in writing a code like

If anybody has written application in .net's 开发者_如何学运维MVC2 and MVC3, there is a change of syntax in writing a code like

<%= %>

has been replaced by

<%: %>

or

@

so this mean that:

<%= %> == <%: %>  OR <%= %> == @

are equals?


<%= %>

Writes out the string exactly as is.

<%: %>

Html Encodes the string and then writes it out.

@

Html Encodes the string and then writes it out if you're using the Razor view engine.

0

精彩评论

暂无评论...
验证码 换一张
取 消