Datalist on image click populate a gridview with data that is inside a div popup
<p>I have  Datalist with Product Image and Product Name on image click i would like to populate the gridview with the products detail information like description and price any help would be great thank you!</p>

<pre><code>&lt;!--pop up div--&gt;
    &lt;div id="blanket" style="display:none;"&gt;&lt;/div&gt;
    &lt;div id="popUpDiv" style="display:none;"&gt;       
        &lt;asp:GridView ID="GridView1" runat="server" DataKeyNames="ProductID" DataSourceID="SqlDataSource2" EnableModelValidation="True" &gt;
        &lt;/asp:GridView&gt;

        &lt;a href="#" onclick="popup('popUpDiv')" &gt;Close&lt;/a&gt;
    &lt;/div&gt;   
    &lt;!--End of popUpDiv--&gt;

&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="&lt;%$ ConnectionStrings:smokeshopConnectionString %&gt;" 
            ProviderName="&lt;%$ ConnectionStrings:smokeshopConnectionString.ProviderName %&gt;" 
            SelectCommand="SELECT ProductID, Name, Description, Price, ImageUrl FROM products"&gt;&lt;/asp:SqlDataSource&gt;
        &lt;asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1"  
        RepeatDirection="Horizontal"         
         DataKeyField="ProductID" 
            onselectedindexchanged="DataList1_SelectedIndexChanged"   &gt;
        &lt;ItemTemplate&gt;        
                &lt;div style="border-style:dotted; border-color:WhiteSmoke;"&gt;                    
                &lt;a onclick="popup('popUpDiv')" href="#" &gt;&lt;asp:Image  ID="Image2" runat="server" ImageUrl='&lt;%# Eval("ImageUrl", "~/Images\\{0}") %&gt;' /&gt;&lt;/a&gt;&lt;br /&gt;               
                &lt;asp:Label ID="NameLabel" runat="server" Text='&lt;%# Eval("Name") %&gt;'&gt;&lt;/asp:Label&gt;&lt;br /&gt;               
                &lt;/div&gt;
        &lt;/ItemTemplate&gt;

    &lt;/asp:DataList&gt;

&lt;asp:sqldatasource ID="Sqldatasource2" runat="server" 
            ConnectionString="&lt;%$ ConnectionStrings:smokeshopConnectionString %&gt;" 
            ProviderName="&lt;%$ ConnectionStrings:smokeshopConnectionString.ProviderName %&gt;" 

            SelectCommand="SELECT ProductID, Name, Description, Price, ImageUrl FROM products WHERE ([ProductID] = ?)"&gt;
            &lt;SelectParameters&gt;
                &lt;asp:CookieParameter CookieName="theProductID" Name="ProductID" Type="String" /&gt;
            &lt;/SelectParameters&gt;
    &lt;/asp:sqldatasource&gt;
</code></pre>
