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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to use multiple controls in a module and use it in a pageHow to use multiple controls in a module and use it in a page
Previous
 
Next
New Post
12/23/2008 4:59 AM
 

Hi,

 

If there are multiple controls used in a module then how to display that control in a page.  That is if i have a view, edit, and display. In the page i want to display the edit module then how to use it.

 

Please do help me

 

Thanks

 

 
New Post
12/23/2008 6:07 AM
 

Hi Sherlock,

you can dynamically load different controls like this:

Dim MyCtl As PortalModuleBase = CType(Me.LoadControl(Me.ModulePath & "MyControl.ascx"), PortalModuleBase)
MyCtl.ModuleConfiguration = ModuleConfiguration
MyCtl.ID = System.IO.Path.GetFileNameWithoutExtension(Me.ModulePath & "MyControl.ascx")
Controls.Add(MyCtl)

this can be done in the Page.Init event depending upon your needs or upon the request.

Best regards,
Dario Rossa

 
New Post
12/23/2008 7:45 AM
 

Hi Dario,

 

Can you Please explain it more clearly to me. I have a module with the view and edit controls in it and i have added this control in the module defininition.

now when i created a new page and added this module the view is the default control that is displayed. how to change it to show the edit control in it.

You are saying that using the coding we can change it. But where to write this coding and all? Please do help me. I am new to DNN.

Please do reply soon.

 

Thanks

 

 
New Post
12/23/2008 8:49 AM
 

Michael Washington has created many tutorials on module development including this one on using the "standard" approach to navigating from one module control to another:

http://www.adefwebserver.com/DotNetNukeHELP/NavigateURL/

Because this approach isolates any module control other than the default view on a page empty of other modules and switches to the admin skin, more often than not I use Dario's approach of dynamically loading non-view controls. Michael covers this approach in another tutorial:

http://www.adefwebserver.com/DotNetNukeHELP/Misc/ModuleNavigationOptions.htm


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
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How to use multiple controls in a module and use it in a pageHow to use multiple controls in a module and use it in a page


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