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.0A module with multiples interfacesA module with multiples interfaces
Previous
 
Next
New Post
2/27/2008 9:46 AM
 

Hello there,

I am creating my first module with DotNetNuke 4.8.0 Starter Kit and C#. I already know how to create a new module with a single interface, I mean the module has just a form and a button Add. When the user clicks this button the record is saved into the BD. It always will show the same form. But how can I do a module with differents "interfaces", eg I'd like to create a module that first shows a grid filled with saved notices (main interface) , from this interface the user can choose Add new notice, Update Notice or Delete Notice. If he/she chooses Add the module must displays a form to the user fills and after that return to the main interface. If the user selects a record in the grid and chooses Update the module must displays the Form filled with the record's data for the user updates it... and so on.  If DNN uses .aspx instead of  .ascx  I would just  call them passing values by QueryString by Window.Open, Respose.Redirect etc. But, it doesn't. So, How can I do it?

Thank you in advance,

Kau.

 
New Post
2/27/2008 12:34 PM
 

There are actually a plethora of ways you *could* go about this.  I'll list a few of them:

1. ASCX files (separate "controls" -- this is the standard way): create more ASCX files in your project and inherit them from PortalModuleBase, then add them as a control in your module definition (either through the host-->Module Definitions section, open the module and click "Add Control", or in the module.dnn file (where module is the name of the module) you can add it as a control there as well -- to deploy this to other servers will require it to be in there).  Sample for the module.dnn and a different "View" control or mode: (this would be under the <modules><module><controls> section)

<control><key>AlternateView</key><title>Alternate View Mode</title><src>DesktopModules/SomeModule/AlternateView.ascx</src><type>View</type></control>

And then you could add it as a module action like this (in the IActionable interface -- ModuleActions property):

actions.Add(this.GetNextActionID(), "Alternate View Mode", ModuleActionType.EditContent, "", "", this.EditUrl("AlternateView"), false, SecurityAccessLevel.View, true, false);

Alternatively, you could redirect to it from code like this (from within the base module control):

Response.Redirect(this.EditUrl("AlternateView"), true);

2. Dynamically loaded controls: this can be done through dynamically loaded ASCX controls, or just using a MultiView control and loading the view as needed.  Either one of these have their implications such as dynamically loaded controls can lose viewstate and working in designtime with multiview can get cumbersome if you have a lot of components

3. ASPX Pages: you *could* include separate ASPX pages in your module and have them handle things -- I do this usually as separate handlers or for popup boxes but not for "core" module functionality.  Just be sure you use "ModulePath" + "somefile.aspx" to access it via a link.


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0A module with multiples interfacesA module with multiples interfaces


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