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.0module title module title
Previous
 
Next
New Post
5/11/2007 12:55 PM
 

I can change the module title no problem - but i need to add a webcontrol next to the module title (a link button) has anybody ever done that ?


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/11/2007 1:45 PM
 

I not believe it is something you can do easily.  YOu MIGHT be able to add a standard HTML link...but other than that I don't think you can do it.


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
5/11/2007 2:47 PM
 

well yeah i could add a hyperlink in there not really much of an issue there

 

I was trying this in the page_init of my module and feel i am sort of there

Try

          
                Dim aTitleObject As Panel = CType(Me.Parent, Panel)

                Response.Write(aTitleObject.FindControl("dnnTITLE").ClientID)
                Response.Write(aTitleObject.FindControl("dnnTITLE").GetType.ToString)
                'Response.Write(aTitleObject.Controls)
            Catch ex As Exception
                Response.Write(ex)
            End Try

Note that "dnnTitle" is the id of title control in the container skin

but now i get the type of 'ASP.admin_containers_title_ascx'  and not really sure how to cast that so i can find the control inside of it to be able to add a control into the dnnlabel there - any ideas


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/11/2007 3:01 PM
 

revised code in my pageinit - however the linkbutton is never added - might be too late in the render? - i dont think so though

 

Try
                Dim aTitleObject As Panel = CType(Me.Parent, Panel)
                Dim multiplecontrols As System.Web.UI.ControlCollection = aTitleObject.FindControl("dnnTitle").Controls
                For Each myControl As Control In multiplecontrols
                    If myControl.GetType.ToString = "DotNetNuke.UI.WebControls.DNNLabelEdit" Then
                        Dim aPanel As LinkButton = New LinkButton
                        aPanel.Text = "this is a linkbutton"
                        Dim myLabel As DotNetNuke.UI.WebControls.DNNLabelEdit = CType(myControl, DotNetNuke.UI.WebControls.DNNLabelEdit)
                        myLabel.Controls.AddAt(0, aPanel)
                    End If
                Next
            Catch ex As Exception
                Response.Write(ex)
            End Try


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
New Post
5/11/2007 3:07 PM
 

If anybody needs to do this here you go - the only problem is you have to know the control id - but maybe my iterating through the controls in the atitleobject panel you could find it

anyway this is rough but seems to work

Try
                Dim aTitleObject As Panel = CType(Me.Parent, Panel)
                Dim multiplecontrols As System.Web.UI.ControlCollection = aTitleObject.FindControl("dnnTitle").Controls
                Dim aControl As Control = aTitleObject.FindControl("dnnTitle")
                Dim bPanel As LinkButton = New LinkButton
                bPanel.Text = "this is a linkbutton"
                aControl.Controls.AddAt(0, bPanel)
            Catch ex As Exception
                Response.Write(ex)
            End Try


Dylan Barber http://www.braindice.com - Dotnetnuke development classes - skins and modules
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0module title module title


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