title: Using QueryString to display Details
body: <p>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  <code>.Union()</code>. I have two pages ContactDetails.aspx and ItemDetails.aspx. </p>
  
  <p>Below is a example of my <code>&lt;ItemTemplate&gt;</code>. 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? </p>
  
  <p>This is the URL I would need to use for Items <code>~/LoggedIn/ItemDetails.aspx?ItemID={0}</code></p>
  
  <pre><code>              &lt;ItemTemplate&gt;
                          &lt;asp:HyperLink runat="server" ID="link"
                          Text='&lt;%#Eval("Name") %&gt;'
                         NavigateUrl='&lt;%#Eval("ID", "~/LoggedIn/ContactDetails.aspx?ContactID={0}")                             %&gt;' /&gt;
                      &lt;br /&gt;
  
                      &lt;ul&gt;
  
                          &lt;li&gt;
                              &lt;span&gt;&lt;b&gt;Identity:&lt;/b&gt;&lt;%#Eval("ID") %&gt;&lt;/span&gt;&lt;/li&gt;
  
  
                          &lt;li&gt;&lt;span&gt;&lt;b&gt;Phone:&lt;/b&gt;&lt;%#Eval("Phone") %&gt;&lt;/span&gt;&lt;/li&gt;
  
                      &lt;/ul&gt;
  
                                      &lt;asp:HyperLink runat="server" CssClass="btn"  ID="ConUpdateLink"
                          Text='Update'
                          NavigateUrl='&lt;%#Eval("ID", "~/Admin/UpdateContact.aspx?ContactID={0}") %&gt;' /&gt;                        
  
                  &lt;/ItemTemplate&gt;
  </code></pre>
  
  <p>Hope this makes sense.</p>