谢谢如题!

解决方案 »

  1.   

    <%
    dim a as string
    If 条件 then
    %>
    <table>
    <tr>
    <td>
    <%=aa%>
    </td>
    </tr>
    </table>
    <%
    End If
    %>
    ????
      

  2.   

    <%
     int i=1;//i 可以是后台非private 变量
     if(i>0)
     {
        Respons.Write("...");
     }
    %>
      

  3.   

    如果是在 gridview或者datalist等
    中绑定字段时判断的话
    可以在 .CS文件里写一个public函数,在这个函数里 进行判断
    前端调用就可以了
    <%=函数名(值)>
      

  4.   

    <%
    if(i==1)
    {
    %>
    <%
    }
    else
    {
    %> 
    <%
    }
    {
    %> 
      

  5.   

    <% obj==null ? string.empty : editor %>
      

  6.   

    如果不是很多条件的话可以用
    ?:运算符
    如果多条件的话,只能在.cs文件中写一个public函数前如
    <%=GetString()%>这样
      

  7.   


    你太历害了,竟然知道我是用gridview,非常感谢,的确是我想要的答案!
      

  8.   

    <% obj==null ? string.empty : editor %>