我有一个中继器,在它的 item_command 事件中我正在绑定另一个中继器。我想根据第二个中继器中的角色显示数据。为此,我想根据用户的角色隐藏和显示一些列。我们如何使用后面的代码来做到这一点。提前致谢。我的代码是
<table id="table1" class="yui" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>
<a href='#' title="Click Header to Sort">EmpID #</a>
</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="Repaddressorbbl" runat="server" OnItemCommand="Repaddressorbbl_ItemCommand">
<ItemTemplate>
<tr id="gh" style="cursor: pointer" onclick="Select(this);">
<td style="text-align: center;">
<%#Eval("empid")%>
</td>
<td>
<asp:LinkButton ID="lknumber" runat="server" Text="Edit" CommandName="searchbybbloraddress" />
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
<tfoot>
</tfoot>
</table>
protected void Repaddressorbbl_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "searchbybbloraddress")
{
bind_rep2();
}
}