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 navigation QuestionModule navigation Question
Previous
 
Next
New Post
7/24/2007 10:40 PM
 

PaskettJ wrote

Nothing errored out and the If statement you provided returned a value, so I changed the "mid=" & CStr(ModuleId) to "mid=" & CStr(ParentModule.ModuleId) but it still didn't work.

Jon

Yes.  This could happen if all your controls are inheriting from PortalModuleBase.  I think only modules directly loaded by DNN should inherit PortalModuleBase (Usually these will be the controls referenced in your module definition).  All other controls should inherit from System.Web.UI.UserControl or your own base (that inherits System.Web.UI.UserControl). 

By the way, I am guessing that the ParentModule.ModuleId returned value was "-1".

 
New Post
7/25/2007 7:54 AM
 

smcclure11 wrote

By the way, I am guessing that the ParentModule.ModuleId returned value was "-1".

This is correct, it returns -1.  I tried omitting the Inherits declaration in the user control but since I need it for the navigation below I have to do something else.

Dim objModules As Entities.Modules.ModuleController = New Entities.Modules.ModuleController
Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID, "AddFile", "mid="& CStr(ParentModule.ModuleId)))

I'm trying to follow Hooligannes recommendation of creating properties for the ModuleID and PortalID in my usercontrol, but now it fusses with me because I need to override the existing properties. I'm trying to figure that one out.

Jon

 
New Post
7/25/2007 8:46 AM
 

PaskettJ wrote

.... but since I need it for the navigation below I have to do something else.

Dim objModules As Entities.Modules.ModuleController = New Entities.Modules.ModuleController
Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID, "AddFile", "mid="& CStr(ParentModule.ModuleId)))

Jon,

I don't think you need to inherit from Portal Modulebase to use NavigateURL.  Also I am not clear on what this code is doing - "Dim objModules As Entities.Modules.ModuleController = New Entities.Modules.ModuleController " -   It appears that you are using objModules for anything.  Also you can access PortalSettings through ParentModule.PortalSettings.

Anyhow, if you get Hooligannes method to work it will likely be faster than searching up the control tree for the parent PortalModuleBase.

Steve

PS. If ParentModule.ModuleID is returning -1, I would guess this user control is embedded within another user control inheriting PortalModuleBase.

 
New Post
7/25/2007 9:27 AM
 

smcclure11 wrote

PS. If ParentModule.ModuleID is returning -1, I would guess this user control is embedded within another user control inheriting PortalModuleBase.

Steve,

This is exactly what I'm doing and I thank you for pointing out my unnecessary use of objModules. As a novice developer Michael Washington's tutorials on his site (and the forums here and asp .net) are my only resources I have to learn this stuff. You can't imagine how terrible it is not having a mentor around to ask the many questions I have. I must choose my problems wisely because I've been flamed severly for asking how to do something. I want to avoid upsetting anyone because I rely so heavily on forum member's willingness to help. I am adamantly trying to get Hooligannes suggestion to work. It's encouraging to know you agree with his method.

Jon

 
New Post
7/25/2007 9:47 AM
 

Steve and Hooligannes,

I was able to eliminate the inherits PortalModuleBase and implement the ParentModule as recommended and it all started working.

Thank you all!

Jon

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module navigation QuestionModule navigation Question


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