Do we need to add any references or import any namespace for Roles.IsUserInRole(username,role) - > is it not giving the right result.
<% if(Model.Count < 1)
{%>
No User's Add Under You!
<% } else {
foreach (var item in Model) { %>
<tr class="tblheader">
<th> User Name </th>
<th> Last Activity </th>
<th> Administrator </th>
<th> Base User </th>
<th> Print User </th>
<th> SDI User </th>
<th> Edit User </th>
</tr>
<% if(Model.Count < 1)
{%>
No User's Add Under You!
<% } else {
foreach (var item in Model) { %>
<td class="usertd">
<%if(Roles.IsUserInRole(item.UserName,"Administrator")) { %>
<asp:Image runat="server" ImageUrl="~/Content/images/buttons/btn_rnd_save.png" alt="Yes" />
<% } else { %>
<asp:Image runat="server" ImageUrl="~/Content/images/buttons/btn_Close.gif" alt="No" />
<% } %>
</td>
<td class="usertd">
<%if(Roles.IsUserInRole(item.UserName,"BaseUser")) { %>
<asp:Image runat="server" ImageUrl="~/Content/images/buttons/btn_rnd_save.png" alt="Yes" />
<% } else { %>
<asp:Image runat="server" ImageUrl="~/Content/images/buttons/btn_Close.gif" alt="No" />
<% } %>
</td>