I decided to create my own version of paging in an ASP.NET datagrid but i ran into 1 problem. I took the example located on http://www.4guysfromrolla.com/webtech/082901-1.shtml and decided that i didn&#039;t want prev and next i wanted page numbers instead.<BR>So i decided to dynamically create a link button for every page and place them in a place holder. but for some unkown reason my AddHanlder for the link button is not working. When you click on the link PageCountEvents is never called. Any ideas?<BR><BR>thx in advance,<BR>Steve<BR><BR> Private Sub CreatePaging()<BR> Dim rcdCount As String = objDS.Tables("tableName").Rows.Count.ToString<BR>< BR> lblRecordCount.Text = "Page " & dgTest.CurrentPageIndex + 1 & _<BR> " of " & dgTest.PageCount & vbTab & _<BR> "&#060;b&#062;&#060;font color=""red""&#062;" & rcdCount & _<BR> "&#060;/font&#062; records found"<BR><BR> Dim currentPage As Integer<BR><BR> Dim test As LinkButton<BR><BR> For currentPage = 1 To dgTest.PageCount<BR> test = New LinkButton()<BR> test.Text = currentPage<BR> test.CommandArgument = currentPage<BR> AddHandler test.Command, AddressOf Me.PageCountEvents<BR><BR> phPageCount.Controls.Add(test)<BR> phPageCount.Controls.Add(New LiteralControl(vbTab))<BR> Next<BR> End Sub<BR><BR> Private Sub PageCountEvents(ByVal sender As Object, ByVal e As CommandEventArgs)<BR> dgTest.CurrentPageIndex += CInt(e.CommandArgument) - 1<BR> SearchType("matter_id")<BR> End Sub