以下是我的查看页面
<table class="travTableCont width_full" cellspacing="0" cellpadding="0" border="0">
@if(Model.lstunutilizedownershipentities.Count==0)
{
<script type="text/javascript">
$(document).ready(function () {
$("#header").hide();
});
</script>
<tr style="text-align:center;">
<label>No data is Available</label>
</tr>
}
<thead id="header">
<tr>
<th style="width: 50%;">
@Model.lstCommonLabels.lblCurrentOwnership
</th>
<th>
@Model.lstCommonLabels.lblCount
</th>
</tr>
</thead>
<tfoot>
</tfoot>
</table>
<div id="pagecontent" style=" overflow:auto;height:300px;">
<table class="travTableCont width_full" border="0" cellspacing="0" cellpadding="0">
<tbody class="travTableContent">
@foreach (var item in Model.lstunutilizedownershipentities)
{
<tr>
<td class="tdo" style="width: 30%;">@item.CurrentOwnership</td>
<td class="tdt"><a href="#" onclick="javascript:GetDetail('@item.CurrentOwnership');">@item.cnt</a></td>
</tr>
}
</tbody>
</table>
</div>
在上面的代码中,我给出了 if 条件,@if(Model.lstunutilizedownershipentities.Count==0)
它在 whenlstunutilizedownershipentities.Count==0
和 when工作lstunutilizedownershipentities.Count!=0
。我想在lstunutilizedownershipentities.Count!=0
.