First, <%:%> and <%=%> inside the variable name, such as:
<div>
<p>welcome to Beginning ASP. 3.5 on <%=
DateTime.Now.ToString ()%></p>
</div>
The output is:
Hello World
<%:%> inside the variable name, passed the encode;<%=%> inside the variable name, did not go through the encode.
Second, <%%> Middle General put function or method, typical ASP program writing.
Example: <tr bgcolor= "#ffffff" >
<TD height= ">"
<div align= "Center" > Category:</div>
</td>
<TD height= "9" >
<%st_getlist ();%>
</td>
</tr>
<script type= "Text/javascript" ></script>
Third, <%#%> here is the binding of data can only be used in data-bound controls
such as: <%# DataBinder. (Container.DataItem, "ClassName")%>
Full code: <asp:datalist id= "classlist" runat= "Server" >
<ItemTemplate> <%# DataBinder. (Container.DataItem, "ClassName")%>
</ItemTemplate>
</asp:DataList></td>
Iv. <%@%> means: reference
As in many. aspx pages, you can see the following code:
<%@ page language= "C #" codefile= "Default.aspx.cs" inherits= "_default"%>
Reprinted from: http://www.cnblogs.com/zhwl/archive/2012/02/23/2364370.html
<%:%>,<%=%>,<%%>,<%#%>,<%@%>