In DNN 4.X, I was able to find the tab in a portal that had a module installed on it and then redirect to that tab. A code snippet is below. I am upgrading it to DNN 7 and have found that some of the functions are obsolete. Updating the references to the recommended functions just shows those functions are also obsolete. The old way still works, but is there a better way to do this?
Dim moduleController As New DotNetNuke.Entities.Modules.ModuleController()
Dim myModuleDefId As Integer = GetDesktopModuleByName("Whatever").DesktopModuleID
Dim tabs As ArrayList = (New TabController()).GetTabs(PortalId)
Dim ti As DotNetNuke.Entities.Tabs.TabInfo
For Each ti In tabs
Dim modules As Dictionary(Of Integer, DotNetNuke.Entities.Modules.ModuleInfo) = moduleController.GetTabModules(ti.TabID)
For Each mi As DotNetNuke.Entities.Modules.ModuleInfo In modules.Values
If mi.DesktopModuleID = myModuleDefId Then
Response.Redirect(NavigateURL(ti.TabID))
End If
Next
Next
Response.Redirect(NavigateURL)