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.0Trying to load editIdea.ascx user control via hyperlink Trying to load editIdea.ascx user control via hyperlink
Previous
 
Next
New Post
11/23/2009 2:26 PM
 

Hello all, and sorry if this question has already been answerd, but I'm having some trouble with a hyperlink column out of a datagrid field that will link to the editIdea.ascx control user control in my module.

I have a custom class (for now at least) that I am using, called Utility

Imports DotNetNuke
Imports System.Text
Imports System.Web
Namespace DotNetNuke.Modules.ShareIdeas

    Public Class Utility

        Public Const ideaID As String = "ideaID"
        Public Const CurrentPage As String = "CurrentPage"

        Public Const UrlPageID As String = "PageID"
        Public Const ParamPageID As String = UrlPageID & "="

        Public Enum MultipageDesktopType

            IdeaDetail
            PendIdeaList
        End Enum

        Public Shared Function NavigateURL(ByVal ParamArray AdditionalParameters As String()) As String
            Dim PortalSettings As DotNetNuke.Entities.Portals.PortalSettings = PortalController.GetCurrentPortalSettings
            Return DotNetNuke.Common.NavigateURL(PortalSettings.ActiveTab.TabID, String.Empty, AdditionalParameters)
        End Function
        Public Shared Sub SetLoadPage(ByVal LoadPage As Integer, ByRef LoadControlName As String, ByRef ControlPath As String)
            Select Case LoadPage
                Case Utility.MultipageDesktopType.PendIdeaList
                    LoadControlName = "IdeasPending.ascx"
                    ControlPath = "/Admin/UserControls/"
                Case Utility.MultipageDesktopType.IdeaDetail
                    LoadControlName = "EditIdea.ascx"
                    ControlPath = "/UserControls/"
               End Select

        End Sub
    End Class
End Namespace

This is what I'm using to generate the code that I'll use in my hyperlink.

Here is the vb code on the page that calls the hyperlink

Private Sub grdIdeas_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles grdIdeas.ItemDataBound

            If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then
                Dim hl As HyperLink = e.Item.Cells(1).Controls(0)
                hl.NavigateUrl = Utility.NavigateURL(Utility.ParamPageID & Utility.MultipageDesktopType.IssueDetail, "id=" & DataBinder.Eval(e.Item.DataItem, "IdeaID"))
                'hl.NavigateUrl = NavigateURL(Utility.ParamPageID & Utility.MultipageDesktopType.IssueDetail, "ideaId=" & DataBinder.Eval(e.Item.DataItem, "IdeaID"))
                'hl.NavigateUrl = NavigateURL(Utility.MultipageDesktopType.IssueDetail, "EditIdea", "ideaId=" & DataBinder.Eval(e.Item.DataItem, "IdeaID"))
                'hl.NavigateUrl = NavigateURL("", "mid=" & ModuleId.ToString, "IdeaID" & "=" & DataBinder.Eval(e.Item.DataItem, "IdeaID"))

            End If
        End Sub 'ItemDataBound

I've looked though several examples to see what I could be doing wrong, as the hyperlink generates the correct information for the UserID and creates the link, however when I click the link I'm ether taken back to the home page of the module, the home page of the site, or to a blank page (with site navigation, just nothing shown on the page where the module resides)

Futhermore it should be noted that the module is using tab pages. Within the module, at the top of the page you can click on different tabs to navigate your way though the different areas of the module. I didn't know if that could be causing the issue.

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Trying to load editIdea.ascx user control via hyperlink Trying to load editIdea.ascx user control via hyperlink


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