Asp.net server-side code block explanations
问题 I've seen many different types of server side code blocks in aspx but never a simple key for what each means. I know some of these but it's really hard to search for symbols in a search engine! Can you help me out? <% %> <%-- --%> <%@ %> <%= %> <%: %> <%$ %> <%# %> 回答1: <% %> - Server side code <%-- --%> - Server Side Comment <%@ %> - Page Directive <%= %> - Display value <%: %> - HTML Encode <%$ %> - Datasource Expression <%# %> - Binding Expression You can find a bit more information about