一些相似数据绑定的符号说明

经常在写ASP.NET 或是看相关技术文章时,会遇上如下一些相似数据绑定符号。今看到了简洁解释,便摘录如下,以备忘。

 

<% %> is simply short for <script runat="server"> </script> aka code render blocks.

<%# %> are binding expressions (plus the above).

<%= %> is the above + a Response.Write().

<%: %> is the above + a Response.Write() wrapped in Html.Encode (new in .NET 4.0).

<%$ %> is an ASP.NET expression, used to bind configuration or resource file data during runtime.

 

Refer URL:
http://stackoverflow.com/questions/5833278/meaning-of-the-various-symbols-in-aspx-page-of-asp-net

 


 

posted @ 2012-10-09 15:01  Insus.NET  阅读(685)  评论(0编辑  收藏  举报