datalist custom paging in asp.net
<p>I am doing custom paging for a datalist.Below method gets the required page numbers.
My problem is the click event is not being fired during debug.
Can anyone tel where the problem is.</p>

<pre><code> private void BindPageNumbers(int TotalRecords)
            {

                int counter = 0;
                for(int i=0;i&lt;TotalRecords;i=i+5)
                {
                    counter=counter+1;
                    LinkButton lnk = new LinkButton();
                    lnk.Click += new EventHandler(lbl_click);
                    lnk.ID = "lnkPage" + (counter).ToString();
                    lnk.Text = (counter).ToString();
                    pages.Controls.Add(lnk);
                    Label spacer = new Label();
                    spacer.Text = "&amp;nbsp;";
                    pages.Controls.Add(spacer);
                }                
            }
void lbl_click(object sender, EventArgs e)
        {
            LinkButton lnk = sender as LinkButton;
            int Currentpage = int.Parse(lnk.Text);
            ListDataBinding_paging(2, this.Days, (Currentpage-1)*5, 5);
        }
</code></pre>

<p>Here "ListDataBinding_paging" is the method from where the datalist is being filled.</p>
