Charles never mind the previous I figured it out but still not getting the linkbutton attached to the handler it seems
heres what i put in my code (basically just what you had )
Public Delegate Sub PageClickedEventHandler(ByVal sender As Object, ByVal e As PageClickedEventArgs)
Public Class PageClickedEventArgs
Inherits EventArgs
Public PageNo As Integer
End Class
Public Event PageClicked As PageClickedEventHandler
Public Sub OnPageClicked(ByVal e As PageClickedEventArgs)
RaiseEvent PageClicked(Me, e)
End Sub
Private Sub PageButton_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
Dim pageNo As Integer = Integer.Parse(e.CommandArgument)
Dim mye As PageClickedEventArgs = New PageClickedEventArgs
mye.PageNo = pageNo
OnPageClicked(mye)
End Sub
then i create and place my button in the render event
Dim myLinkButton1 As LinkButton = New LinkButton
myLinkButton1.Text = "newish"
myLinkButton1.CommandArgument = "8"
myLinkButton1.Enabled = True
AddHandler myLinkButton1.Command, AddressOf PageButton_Command
cellDisplayLinks.Controls.Add(myLinkButton1)
but my link still isnt active or do anything - it should just give me a response write after postback saying the button was clicked