fancybox jquery on templete field of gridview binding issue
<p>Here I have created a website in c#.net and I want the page which will be open after clicking the gridview field in the fancybox.
But I am facing one problem that it opens the page in fancybox for the first row only I don't know why..?</p>

<p>Here is my code:</p>

<pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="../fancybox/jquery.mousewheel-3.0.4.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="../fancybox/jquery.easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css"
    media="screen" /&gt;
&lt;script type="text/javascript" language="javascript"&gt;
    $(document).ready(function() {

            $('#deal_VCU').fancybox({
                'width': '85%',
                'height': '85%',
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe',
                'titleShow': false
            });
        });
 &lt;/script&gt;

&lt;asp:GridView ID="GrdDeals" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" CellPadding="1" DataKeyNames="OFID" DataSourceID="SqlDataSource3"
    ForeColor="#333333" GridLines="None" PageSize="100" 
    onrowdatabound="GrdDeals_RowDataBound" onrowcommand="GrdDeals_RowCommand"&gt;
    &lt;Columns&gt;
        &lt;asp:BoundField DataField="OFID" HeaderText="Offer ID" SortExpression="OFID" /&gt;
        &lt;asp:BoundField DataField="Text_Message" HeaderText="Offer Text" SortExpression="Text_Message" /&gt;

        &lt;asp:TemplateField HeaderText="Deal for VCU" SortExpression="Counter1"&gt;
            &lt;ItemTemplate&gt;
                &lt;a id="deal_VCU" href="DetailView.aspx?ID=&lt;%#Eval("OFID")%&gt;&amp;Op1=Counter2"&gt;
                    &lt;%#Eval("Counter2")%&gt;&lt;/a&gt;
            &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
        &lt;asp:TemplateField HeaderText="Deal for SCSU" SortExpression="Counter2"&gt;
            &lt;ItemTemplate&gt;
                &lt;a id="deal_SCSU" href="DetailView.aspx?ID=&lt;%#Eval("OFID")%&gt;&amp;Op1=Counter2"&gt;
                    &lt;%#Eval("Counter2")%&gt;&lt;/a&gt;
            &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
        &lt;asp:TemplateField HeaderText="Deal for Trinity" SortExpression="Counter3"&gt;
            &lt;ItemTemplate&gt;
                &lt;a id="deal_Trinity" href="DetailView.aspx?ID=&lt;%#Eval("OFID")%&gt;&amp;Op1=Counter3"&gt;
                    &lt;%#Eval("Counter3")%&gt;&lt;/a&gt;
            &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
    &lt;/Columns&gt;
    &lt;FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
    &lt;RowStyle BackColor="#EFF3FB" Height="4" /&gt;
    &lt;EditRowStyle BackColor="#2461BF" /&gt;
    &lt;SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /&gt;
    &lt;PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Right" /&gt;
    &lt;HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
    &lt;AlternatingRowStyle BackColor="White" /&gt;
&lt;/asp:GridView&gt;
</code></pre>

<p>Here I am facing one problem that the fancybox is getting open for the first row only.</p>
