repeater 显示 隐藏 相关字段

方法1:
<td visible="<%# ISshow(DataBinder.Eval(Container, "t1"))%>"><a href="d.aspx"><%# DataBinder.Eval(Container, "t1")%></a> 
</td>
td不知道有没有visible属性。应该有一个是否显示的属性。

.cs 在后代码里定义一个函数
public string ISshow(string t1)
{
   if(t1==""要不就是null){ return false;} else { return true;}

}

方法2:
  <asp:CheckBox ID="ckbProductID"  runat="server"  Visible='<%# Page.User.Identity.IsAuthenticated %>' />



你可能感兴趣的:(显示)