例如有时需要在前台布局中使用一些在Global.asax页面中定义的全局变量Application[],Session[],
您是<%=Application["counter"] %>位访问者!
欢迎您,<%=Session["username"]%>
//有时在.aspx.cs中定义了一个变量,如: protected string str_1;
那要在其对应的前台代码.aspx中使用,比如要把它绑定到Table表中的某个单元格中,则应该这样写:
<td class="style1"><%=str_1%></td>