title: ASP.net Listview AJAX ModalPopupExtender
body: <p>I am trying to get a modalpopupextender to show from a listview that is inside of a tab panel. If this is possible can someone please help me? This is my image listview, from here I would just like to pop up images - like with lightbox or fancybox. I would really like to use the ajax modal though, because other parts of this page are using it and I would like the pages modals to be consistent.</p>
  
  <pre><code>&lt;!-- Images --&gt;
  &lt;asp:TabPanel id="tab5" runat="server" HeaderText="Images"&gt;
      &lt;ContentTemplate&gt;
          &lt;ul class="info"&gt;
          &lt;asp:ListView ID="lvImages" runat="server" DataSourceID="dsMarketingImages"&gt;
          &lt;ItemTemplate&gt; 
              &lt;li title='&lt;%# eval("MarketingData") %&gt;'&gt;
                  &lt;a target="_blank" href="&lt;%# eval("MarketingData") %&gt;"&gt;&lt;%#Eval("MarketingTitle")%&gt;&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ItemTemplate&gt;
          &lt;/asp:ListView&gt;
          &lt;/ul&gt;
      &lt;/ContentTemplate&gt;        
  &lt;/asp:TabPanel&gt;
  </code></pre>
  
  <p>I am trying this but get the error: The server tag is not well formed. How do I display the image inside of the modal? I'm pretty stumped here. Help would be appreciated!</p>
  
  <pre><code>        &lt;asp:ListView ID="lvImages" runat="server" DataSourceID="dsMarketingImages" DataKeyNames="MarketingID"&gt;
          &lt;ItemTemplate&gt;
              &lt;li&gt;
                  &lt;asp:LinkButton ID="ViewImagesButton" runat="server"&gt;&lt;%#Eval("MarketingTitle")%&gt;&lt;/asp:LinkButton&gt;&lt;asp:ImageButton ID="ImageButton1" runat="server" Style="float:right;" AlternateText="" ImageUrl="../../images/delete.png" CommandName="Delete" OnClientClick="return confirm('Are you sure you want to delete this image?')" /&gt;
                  &lt;asp:Panel ID="ViewImagesPanel" runat="server"&gt;
                      &lt;asp:Image ID="Image1" runat="server" href="&lt;%# Eval("MarketingData") %&gt;"/&gt;
                  &lt;/asp:Panel&gt;
                  &lt;asp:ModalPopupExtender ID="ViewImagesModal" runat="server" BackgroundCssClass="modalBackground" DropShadow="true" DynamicServicePath="" Enabled="true" PopupControlID="ViewImagesPanel" TargetControlID="ViewImagesButton"&gt;&lt;/asp:ModalPopupExtender&gt;
              &lt;/li&gt;
          &lt;/ItemTemplate&gt;
          &lt;/asp:ListView&gt; 
  </code></pre>