https://forums.asp.net/t/1139381.aspx?what+are+these+special+tags+and+

答案1

Those tags can be hard to search for since the are generally discarded by search engines as noise...

here are some helpful links for you on the various tags.

<% %>  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://msdn.microsoft.com/en-gb/library/ms178135(vs.80).aspx

<%= %> most useful for displaying single pieces of information. http://msdn.microsoft.com/en-us/library/6dwsdcf5(VS.71).aspx

<%# %> Data Binding Expression Syntax. http://msdn.microsoft.com/en-us/library/bda9bbfx.aspx

<%$ %> ASP.NET Expression. http://msdn.microsoft.com/en-us/library/d5bd1tad.aspx

<%@ %> Directive Syntax. http://msdn.microsoft.com/en-us/library/xz702w3e(VS.80).aspx

<%-- --%> Server-Side Comments. http://msdn.microsoft.com/en-US/library/4acf8afk.aspx

<%: %> Like <%= %> But HtmlEncodes the output (new with Asp.Net 4). http://weblogs.asp.net/scottgu/archive/2010/04/06/new-lt-gt-syntax-for-html-encoding-output-in-asp-net-4-and-asp-net-mvc-2.aspx

答案2

<%# is a data binding syntax for use in databound controls. 
<%= is a short cut for Response.Write.  这个是无法动态计算的,适合存放一些不会变化的东西
<%@ is a directive to include a namespace, page directives, etc.

最新文章

  1. Java To CSharp源代码转换
  2. HDU 2577 How to Type(dp题)
  3. java nio知识点总结
  4. java 访问器方法中对象引用的问题
  5. poj 2635 The Embarrassed Cryptographer(数论)
  6. Activity的lanuchmode
  7. nodejs学习[持续更新]
  8. 在 Mac OS X 中建立加密的 Zip 压缩 -- 让机密资料加上密码
  9. 用android LinearLayout和RelativeLayout实现精确布局(转)
  10. 花括号中的json数据---&gt;转为数组array
  11. WIN2003 设置 OPENVPN 服务端
  12. zk command
  13. 使用idea新建jsp
  14. Powershell Linux正式版可用,启动名称有变
  15. java.lang.IllegalStateException: Connection pool shut down
  16. Debian &amp; CentOS建立本地iso源
  17. hdu 1757 (矩阵快速幂) 一个简单的问题 一个简单的开始
  18. Django的开始
  19. zeroclipboard实现多浏览器复制到粘贴板功能
  20. jzoj5804

热门文章

  1. python windows 下pip easy_install 使用错误的问题
  2. Python全栈-库的操作
  3. 【转】推荐4个不错的Python自动化测试框架
  4. Python学习记录之(五)-----类进阶篇
  5. OpenCV学习笔记(一) - 边界填充、Rect函数
  6. 【转】ETL讲解(很详细!!!)
  7. Linux基础命令---ifdown、ifup
  8. Linux基础命令---文本格式转换expand,unexpand
  9. window下nodejs用nodemon启动koa2项目(用cmd启动不了,要用Git Bash Here 启动才可以)
  10. AELF(ELF)区块链项目介绍