<%# if databinder.eval(container.dataitem,"reply")=null || databinder.eval(container.dataitem,"reply")="" then %> <table width="350" border="0" cellspacing="0" cellpadding="0"> <tr> <td>已经回复</td> </tr> </table> <% end if %>
acewang(平平安安过一年)你可以理解我的错误了.我是在datalist控件里进行判定<asp:datalist ID="DataList1" runat="server" RepeatColumns="1"> <itemtemplate> <%# if databinder.eval(container.dataitem,"reply")="" then %> <table width="350" border="0" cellspacing="0" cellpadding="0"> <tr> <td>已经回复</td> </tr> </table> <% end if %> </itemtemplate> </asp:datalist>
重在体会.net编程的思路 -------------- <%# if databinder.eval(container.dataitem,"reply")="" then %> <table width="350" border="0" cellspacing="0" cellpadding="0"> <tr> <td>已经回复</td> </tr> </table> <% end if %> -------------- 你这还是asp的实现方式
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>已经回复</td>
</tr>
</table>
<% end if %>
<itemtemplate>
<%# if databinder.eval(container.dataitem,"reply")="" then %>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>已经回复</td>
</tr>
</table>
<% end if %>
</itemtemplate>
</asp:datalist>
--------------
<%# if databinder.eval(container.dataitem,"reply")="" then %>
<table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>已经回复</td>
</tr>
</table>
<% end if %>
--------------
你这还是asp的实现方式
:)