It looks like you're using Entity Framework for your ORM? I'm more familiar with Linq to SQL, and it's difficult to give you an exact solution without knowing all the behind the scenes details - but assuming you have the appropriate primary/foreign key relationships setup in your db - you should be able to use linq to query the information you need:
<table>
<tr>
<td class="td1">
<%= serv.Description%>
</td>
<td class="td3">
<% if (serv.AspnetUser.Where(u => u.UserName == User.Identity.Name).Count() > 0)
{ %>
Already subscribed
<% }
else
{ %>
Not subscribed
<%
} %>
</td>
</tr>
</table>
Hope that helps.
Bryan
2010-01-18 05:03:22