I have a search that displays results. The results are of two types Items and Contacts. They are displayed under one template in a ListView using .Union(). I have two pages ContactDetails.aspx and ItemDetails.aspx.
Below is a example of my <ItemTemplate>. This just shows the Contact part. How would I change those links based on whether it is a Item or Contact and change the URL based on that?
This is the URL I would need to use for Items ~/LoggedIn/ItemDetails.aspx?ItemID={0}
<ItemTemplate>
<asp:HyperLink runat="server" ID="link"
Text='<%#Eval("Name") %>'
NavigateUrl='<%#Eval("ID", "~/LoggedIn/ContactDetails.aspx?ContactID={0}") %>' />
<br />
<ul>
<li>
<span><b>Identity:</b><%#Eval("ID") %></span></li>
<li><span><b>Phone:</b><%#Eval("Phone") %></span></li>
</ul>
<asp:HyperLink runat="server" CssClass="btn" ID="ConUpdateLink"
Text='Update'
NavigateUrl='<%#Eval("ID", "~/Admin/UpdateContact.aspx?ContactID={0}") %>' />
</ItemTemplate>
Hope this makes sense.
contactId??itemidorcontactid??