阿宽

Nothing is more powerful than habit!
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1. < %#... %>

  < %#... %>: 是在绑定控件DataBind()方法执行时被执行,用于数据绑定,如:

< %# Container.DataItem("tit"%>


2. < %= %>

   在程序执行时被调用,可以显示后台变量值,如:

< %= 后台变量%>


3. < % %>
    内联代码块里面可以在页面文件*.aspx或*.ascx文件里面嵌入后台代码,如:

< %
for(int i=0;i<100;i++)
{
    Reaponse.Write(i.ToString());
}
%>

4. < %@ %>

  是在*.aspx页面前台代码导入命名空间,如:

< %@ Import namespace="System.Data"%>


转自:http://www.cnblogs.com/ywqu/archive/2009/01/08/1372128.html