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...Why must be Module-Developing so complicated?Why must be Module-Developing so complicated?
Previous
 
Next
New Post
1/21/2010 11:50 PM
 
My apologies - I actually didn't notice the "using System.Web.UI.WebControls".

The line I was referring to is this line
public partial class WebUserControl1 : System.Web.UI.WebControls
to be changed to
public partial class WebUserControl1 : DotNetNuke.Entities.Modules.PortalModuleBase

I'll go update my other post to be clear on that.
 
New Post
4/14/2010 12:37 PM
 

Based on this post www.dotnetnuke.com/Community/Forums/t... I decided to write up the steps to add an additional ascx control to a module.

Project->Add New Item->Web User Control
Project->Add New Item->Resource File
Rename Resource1.resx to WebUserControl2.ascx.resxOpen WebUserControl2.ascx.cs
Change "public partial class WebUserControl2 : System.Web.UI.UserControl" to "public partial class WebUserControl2 : DotNetNuke.Entities.Modules.PortalModuleBase"
Open WebUserControl1.ascx.cs
Change "public partial class WebUserControl1 : DotNetNuke.Entities.Modules.PortalModuleBase" to "public partial class WebUserControl1 : DotNetNuke.Entities.Modules.PortalModuleBase, DotNetNuke.Entities.Modules.IActionable"
After the Page_Load function in WebUserControl1 add
  public ModuleActionCollection ModuleActions
  {
      get 
      {
          ModuleActionCollection actions = new ModuleActionCollection();
          actions.Add(GetNextActionID(), "WebUserControl2 Menu Text", ModuleActionType.AddContent, "", "", Globals.NavigateURL("MyControlKey", new[] { "mid/" + ModuleId }), false, DotNetNuke.Security.SecurityAccessLevel.Edit, true, false);
          return actions;
      }
  }
Open WebApplication1.dnn
Add the follow moduleControl block inside the moduleControls
  <controlKey>MyControlKey</controlKey>
  <controlSrc>DesktopModules/WebApplication1/WebUserControl2.ascx</controlSrc>
  <iconFile />
  <helpUrl />
  <supportsPartialRendering>True</supportsPartialRendering>
  <controlTitle />
  <controlType>Edit</controlType>
Add the following 'file' blocks to the 'files' block
  <file>
    <name>WebUserControl2.ascx</name>
    <sourceFileName>WebUserControl2.ascx</sourceFileName>
  </file>
  <file>
    <path>App_LocalResources</path>
    <name>WebUserControl2.ascx.resx</name>
    <sourceFileName>WebUserControl2.ascx.resx</sourceFileName>
  </file>
Include WebUserControl2.ascx and WebUserControl2.ascx.resx in the zip file.

 

I haven't gone through and tested these steps additional steps, so there may be a glitch or 12, but it should lead you in the correct direction for adding additional functionality to a module. Let me know about any issues and I can update. :)

 
New Post
4/14/2010 4:21 PM
 

Hello Baatezu,

I think you may be able to help me. I have just developed a custom module for publishing news on my dnn website. I have a 2-pane page and intend to place the module on the side bar pane. How do I get the news details to display on the content pane when the user select a news item.

Presently it displays within the side bar pane. Please kindly assist me resolve this problem. I've tried but unable to come up with a workable solution.

Any one that has encountered and resolved a similar problem should kindly help me

You can email me at: e_b_i_67@yahoo.com.

 
New Post
4/14/2010 7:39 PM
 

 You should start a new thread with your question as it doesn't pertain to this topic.

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Why must be Module-Developing so complicated?Why must be Module-Developing so complicated?


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