eval function and postback issue with asp.net pager
<p>In a gridview, I add this pager:</p>

<pre><code>&lt;PagerSettings Mode="Numeric" Position="Bottom" /&gt; 
&lt;PagerStyle HorizontalAlign="Left" VerticalAlign="bottom" CssClass="MyPagerRow"/&gt;
</code></pre>

<p>The pager renders a table with cells like this:</p>

<p><code>&lt;td&gt;&lt;a href="javascript:__doPostBack(....)" class="MyPagerLink"&gt;pagenumber&lt;/a&gt;&lt;/td</code>></p>

<p>The ajax postback works great with the updatepanel properly doing its thing. However, if the user press the cell instead of precisely hitting the text inside the cell, the postback doesn't work because the anchor is linked to the text inside the cell instead of the entire cell.</p>

<p>So I'm trying to alter the click event with some jquery like this:</p>

<pre><code>    $('.MyPagerLink').each(function () {

        var TheLink = $(this).attr('href');
        var CellContent = $(this).html();

        var LinkExtract = TheLink.split(":");
        var PagerCell = $(this).parent();

        $(PagerCell).html('');
        $(PagerCell).html(CellContent);
        $(PagerCell).click(function () { eval(LinkExtract[1]); });

    }); 
</code></pre>

<p>This works too in the sense that when the user clicks on the cell, the paging occurs. However, instead of a partial ajax postback, the click now triggers a full page postback.</p>

<p>I'm not figuring out why but any suggestion would be helpful.</p>

<p>Thanks.</p>
