<% %> An embedded code block is server code that executes during the page's render phase. The code in the block can execute programming statements and call functions in the current page class. http://msdn2.microsoft.com/en-gb/library/ms178135(vs.80).aspx<%= %> most useful for displaying single pieces of information. http://msdn2.microsoft.com/en-us/library/6dwsdcf5(VS.71).aspx<%# %> Data Binding Expression Syntax. http://msdn2.microsoft.com/en-us/library/bda9bbfx.aspx<%$ %> ASP.NET Expression. http://msdn2.microsoft.com/en-us/library/d5bd1tad.aspx<%@ %> Directive Syntax. http://msdn2.microsoft.com/en-us/library/xz702w3e(VS.80).aspx<%-- --%> Server-Side Comments. http://msdn2.microsoft.com/en-US/library/4acf8afk.aspx
<%= %> //大多用于显示单条信息
<%# %> //数据绑定表达式语法
<% %> 里面是代码块.应该是为了给asp程序员点面子才加的.就是从上往下会顺序执行.用处不大.我也没学过asp.
<%= %> 在render时会执行.用处也不大.
<% %>和<%= %>完全可以不用.在code behind里用asp.net Literal控件都可以完全替代.