In the Asp.net application, common <% @ %>, <% # %>, and <% = %> On the Asp.net page. Use <% $ %> to bind a resource project to a global project, and use <%: %> to bind viewdata to Asp.net MVC.
<% @ %> It is mainly used to define pages, introduce controls, components, and set cache on Web pages:
1: <%@ Page %>
2: <%@ Assembly %>
3: <%@ Import %>
4: <%@ MasterType %>
5: <%@ OutputCache %>
6: <%@ PreviousPageType %>
7: <%@ Reference %>
8: <%@ Register %>
<% # %> It is mainly used to bind background data to the foreground. Generally, a corresponding databind () is required in the background for binding.
1: <asp:GridView ID="gvProducts" runat="server">
2: <Columns>
3: <asp:TemplateField>
4: <ItemTemplate>
5: <%# Eval("ProductName") %>
6: </ItemTemplate>
7: </asp:TemplateField>
8: </Columns>
9: </asp:GridView>
<% = %> It is mainly used to input background variables in the foreground.
1: <%= Page.IsPostBack %>
<% $ %> Used to specify the resource item corresponding to the foreground page in the globalization solution.
1: <asp:Label ID="lblAmount" runat="server" Text="<%$ Resources:TestSiteResources, TotalAmount %>"></asp:Label>
<%: %> Bind viewdata to the Asp.net MVC project.
1: <%: ViewData["Message"] %>
From: http://www.cnblogs.com/zhaozhan/archive/2010/07/20/1781756.html