<% if(intM1 != 0){ %>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td bgcolor="#616161" rowspan="20" width="5"> <div align="center"></td>
          <td height="5" width="6" bgcolor="#616161"> <div align="center"></td>
          <td rowspan="20" bgcolor="#616161" width="1"> <div align="center"></td>
        </tr> 
</table>
<%}%>

解决方案 »

  1.   

    例子<%@ Page Language="C#" EnableViewstate="true"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <body>
    <Form runat="server">
    <%
    int IntM = 100;
    if(IntM!=0){
    %>
    xxxxx
    <%}%>
    </form>
    </body>
    </html>
      

  2.   

    不是很明白,我的目的是让C# 编码与 aspx 分离,aspx 仅仅调用C#后端的数值,和
    Text=<%# DataBinder.Eval(Container.DataItem, "名称") %> 方式相同.
      

  3.   

    这个基本跟asp一样,不过有一点需要提醒注意,如果你在.cs中写程序逻辑,比如要查询一个dataset出来,请把dataset定义成protected类型,以保证你在aspx文件中还能够调用。因为aspx和cs是继承与被继承关系。