Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Paging Control - customizingPaging Control - customizing
Previous
 
Next
New Post
3/7/2007 3:55 PM
 

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

 

 


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
3/7/2007 6:52 PM
 

you need to add the button before the render event, as the render evnt is too late in the page life-cycle.

It needs to be in OnLoad or CreateChildControls


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
3/8/2007 9:41 AM
 

Okay i moved it to the CreateChildControls and still nothing - I must be missing something basic somewhere

 

I also tried creating one in the load event of the control - thats doesnt seem to work either -


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
3/8/2007 12:27 PM
 

I recall I had a similar problem on an .aspx page once - have you tried:

1. Explicitly assigning a value to the ID property of the new LinkButton and

2. Moving the AddHandler statement to occure AFTER the control has been added to the cell's control collection

Also, check that the module's cache time is set to 0 in both the module definition and the module settings.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Paging Control - customizingPaging Control - customizing


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out