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 Load Warning: NavigateURL methodModule Load Warning: NavigateURL method
Previous
 
Next
New Post
8/25/2007 6:49 PM
 

Hi guys,

I am trying to navigate between user controls inside my module using following method

Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "Category", "mid=" + ModuleId.ToString()));

where "Category" is the control key for the user control to which I am trying to navigate, but its giving me a strnage error saying

Module Load Warning
One or more of the modules on this page did not load. This may be temporary. Please refresh the page (click F5 in most browsers). If the problem persists, please let the Site Administrator know.

Any idea what's wrong I am doing?

Thanks.

 
New Post
10/4/2007 12:00 PM
 

Guys,

I found a way of how to do it. Following steps are required to make it work for every user control (.ascx) that you add to your module.

1. By default a user control is inherited from " System.Web.UI.UserControl" class. you need to change its definition by inheriting it from a DotNetNuke class, e.g. if a user control name is Category, it will be defined like this

From: public partial class Category : System.Web.UI.UserControl

To: public partial class Category : PortalModuleBase, IActionable

where "PortalModuleBase" is a DotNetNuke class defined under "DotNetNuke.Entities.Modules" namespace and "IActionable" is an interface defined under same namespace.

2. Then provide an implementation for "IActionable" interface as follows.

#region

Optional Interfaces/// -----------------------------------------------------------------------------

 

/// <summary>

 

/// Registers the module actions required for interfacing with the portal framework

 

/// </summary>

 

/// <value></value>

 

/// <returns></returns>

 

/// <remarks></remarks>

 

/// <history>

 

/// </history>

 

/// -----------------------------------------------------------------------------

 

{

 

public ModuleActionCollection ModuleActionsget

{

 

Actions.Add(

 

}

}

3. Then compile and run your application. Login with "Host" account, go to Host Menu, select "Module Definitions" under it. Then select your module in which you have added this new user control.

4. Add a definition for control and provide it a key name "Category".

5. Now you can navigate to this control from any other control in your module using this code.

Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "Category", "mid=" + ModuleId.ToString()));

Enjoy :)

Thanks,

Syed Danish.

ModuleActionCollection Actions = new ModuleActionCollection();this.GetNextActionID(), Localization.GetString(ModuleActionType.AddContent, this.LocalResourceFile), ModuleActionType.AddContent, "", "", this.EditUrl(), false, SecurityAccessLevel.Edit, true, false);return Actions;

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Load Warning: NavigateURL methodModule Load Warning: NavigateURL method


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