Hi i have a listview and i want the edit button in the itemtemplate to be visible if two conditions are satisfied
1. The User Must Be A Manager
2. A Column Named "IsActive" In That Row Must Be True...
Now I Can Do Like...
To check against the column value....
Or
To check manager against the method in code behind called "IsManager(stri ng id)"
But i can't marge them i.e if both conditions are satisfied then the edit button will be visible... say like...
Or something like that...
How do i do that?
Thanks in advance....
1. The User Must Be A Manager
2. A Column Named "IsActive" In That Row Must Be True...
Now I Can Do Like...
Code:
<asp:ListView runat="server" ID="lstGrInfo"
........
<ItemTemplate>
........
<tr>
<td>
<asp:LinkButton ID="EditButton" runat="server" Text="Edit" CommandName="Edit"
Visible='<%#Bind("IsActive")%>'/>
</td>
.....
</tr>
</ItemTemplate>
......
</asp:ListView>
Or
Code:
<asp:ListView runat="server" ID="lstGrInfo"
........
<ItemTemplate>
........
<tr>
<td>
<asp:LinkButton ID="EditButton" runat="server" Text="Edit" CommandName="Edit"
Visible='IsManager(<%=User.Identity.Name%>)'/>
</td>
.....
</tr>
</ItemTemplate>
......
</asp:ListView>
But i can't marge them i.e if both conditions are satisfied then the edit button will be visible... say like...
Code:
Visible='IsManager(<%=User.Identity.Name%>) && <%#Bind("IsActive")%>'
How do i do that?
Thanks in advance....
Comment