asp.net 方法: Tag 使用技巧
<% if (User.IsInRole(”admin”)) { %>
You can see this
<% } else { %>
You are no admin fool!
<%} %>
Used for Binding Expressions; such as Eval and Bind, most often found in data controls like GridView, Repeater, etc.:
<asp:Repeater ID=”rptMeetings” DataSourceID=”meetings” runat=”server”>
<ItemTemplate>
<%# Eval(”MeetingName”) %>
</ItemTemplate>
</asp:Repeater>