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.0Need Suggestion for How to Configure Custom ModuleNeed Suggestion for How to Configure Custom Module
Previous
 
Next
New Post
11/8/2007 10:37 PM
 

We need to add functionality via a custom module that views and edits data in a number of tables.  This involves about 5 or 6 different pages for the user.  I don't want to build a different custom module for each screen.

My idea is that I would create a single module with multiple user controls.  I would have a user control for each screen that needs to be edited.  I would then create a master user control that would be the main one for the module.  This would be the control that has settings and such.  My idea is provide a setting for my control that could be changed for each page it is dropped into.  This setting would let the main or master user control know which child or worker usercontrol to dynamically load to provide the UI for the user to do their work. 

For example, I would build a page in DNN called Client.  I would drop my module onto the page.  I would set a key or something in the settings of the module and set appropriate security.  At runtime, the module user control would read the setting and then dynamically load the "real" usercontrol that the user iteracts with to view/add/edit/delete client records.

Does this sound like a sound design with  DNN?  Is there perhaps a more straightforward way of accomplishing this?

Thanks in advance for any suggestions or help.

 
New Post
11/8/2007 11:44 PM
 

That's a common technique which I prefer (particularly for multiple view controls).  Here are several pointers for its use: 1) Create a base class (itself inheriting from PortalModuleBase) for the dispatch or master user control as well as the child controls. This base class will contain all of the common properties and methods needed by the master and child controls and makes type casting of the object returned by LoadControl easier. 2)  After the child control is loaded, pass the ModuleConfiguration from the master control to the child control to provide easy access to ModuleID and other properties of your module. 3) If you are using localication, I seem to recall that you will also need to pass the LocalResourceFile property from the master to child control.

Another (and more straightforward) way to accomplish this is to use DNN's own pattern of defining each module control with a different ControlKey then using one of the overloaded methods of NavigateUrl and/or EditUrl to to redirect to the proper editing control based on a link, button, etc. in the master control.

Yet another approach is to have all the editing done in one module control with the appropriate sections hidden or revealed using panels, divs/table rows, MultiView or Wizzard controls.  Unless each section is relatively short, I find this leads to some large and hard to follow .ascx files and multiple code branches.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Need Suggestion for How to Configure Custom ModuleNeed Suggestion for How to Configure Custom Module


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