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.0Can Not Add more than One Custom Module To a PageCan Not Add more than One Custom Module To a Page
Previous
 
Next
New Post
2/12/2007 5:56 PM
 

I have created two custom modules. I have created definitions without a problem. When I add either custom module to a page, I can add more modules, but they do not show up until I delete the first custom module. My modules are really simple. I can add a module that came with DNN 4.4.1 first then my module but after I add my module, any module I add does not show up. =(

HTML:

<%@ Control language="C#" Inherits="TIS.Modules.Roles.ViewRoles" CodeFile="ViewRoles.ascx.cs" AutoEventWireup="false"%>

<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>

<table>tr>

<

 

<td>

 

<asp:Label ID="labelAdd" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="11px" Text="Add Route"></asp:Label>&nbsp;

 

<asp:TextBox ID="textAdd" runat="server" Font-Names="Verdana" Font-Size="11px" MaxLength="100"></asp:TextBox>&nbsp;

 

<asp:Button ID="buttonAdd" runat="server" Font-Names="Verdana" Font-Size="11px" Text="Add" OnClick="buttonAdd_Click" />

 

<br />

 

<br />

 

</td>tr>tr>

</

<

 

<td>

 

<asp:GridView ID="gvRoles" runat="server" AutoGenerateColumns="False" DataSourceID="odsRoles" AllowSorting="True" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" EnableSortingAndPagingCallbacks="True" Font-Names="Verdana" Font-Overline="True" Font-Size="11px" Width="240px" AllowPaging="True" DataKeyNames="Id">

 

<Columns>

 

<asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" Visible="False" />

 

<asp:BoundField DataField="Name" HeaderText="Role" SortExpression="Name" />

 

</Columns>

 

<HeaderStyle Font-Bold="True" />

 

<FooterStyle Font-Names="Verdana" Font-Size="11px" Font-Strikeout="True" />

 

<PagerStyle Font-Names="Verdana" Font-Overline="True" Font-Size="11px" />

 

</asp:GridView>

 

&nbsp;

 

</td>tr>asp:ObjectDataSource ID="odsRoles" runat="server" DataObjectTypeName="TIS.Modules.Roles.Role"

</

<

 

DeleteMethod="DeleteRole" InsertMethod="AddRole" SelectMethod="GetRoles" TypeName="TIS.Modules.Roles.RoleController"

 

UpdateMethod="UpdateRole"></asp:ObjectDataSource>

 

</table>

Code Behind:

using

using

using

using

using

using

using

using

using

using

using

using

using

using

namespace

{

partial class ViewRoles : PortalModuleBase, IActionable

 

{

#region

private string strTemplate;

#endregion

#region

public bool DisplayAudit()

{

bool retValue = false;

if ((string)Settings["auditinfo"] == "Y")

{

retValue = true;

}

return retValue;

}

#endregion

#region

protected void Page_Load(System.Object sender, System.EventArgs e)

{

}

protected void buttonAdd_Click(object sender, EventArgs e)

{

RoleController rc = new RoleController();

Role role = new Role();

role.Name = textAdd.Text;

rc.AddRole(role);

gvRoles.DataBind();

textAdd.Text = "";

}

#endregion

#region

public ModuleActionCollection ModuleActions

{

get

 

{

ModuleActionCollection Actions = new ModuleActionCollection();

Actions.Add(this.GetNextActionID(), Localization.GetString(ModuleActionType.AddContent, this.LocalResourceFile), ModuleActionType.AddContent, "", "", this.EditUrl(), false, SecurityAccessLevel.Edit, true, false);

return Actions;

}

}

#endregion

 

 

}

}

 

Optional Interfaces
Event Handlers
Public Methods
Private Members
TIS.Modules.Roles
DotNetNuke.Services.Localization;
DotNetNuke.Services.Exceptions;
DotNetNuke.Security;
DotNetNuke.Entities.Modules.Actions;
DotNetNuke.Entities.Modules;
DotNetNuke.Common.Utilities;
DotNetNuke;
TIS.Modules.Roles;
System.Web.UI.WebControls;
System.Web.UI;
System.Reflection;
System.Collections.Generic;
System.Collections;
System;
 
New Post
2/12/2007 9:08 PM
 
You have indicated that you created 2 custom modules, but only show the code for one. Is there a reason? Also ensure that you have cache set to 0 in the module definition for each of the modules.


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
2/13/2007 11:44 AM
 
The code is the same for both modules, except for the table that it is drawing from . I run VS2005 without debugging. I can add modules then one of mine, then I can add more, but the modules added after mine do not show up until I delete mine. The cache for all controls are set to 0.
 
New Post
2/13/2007 12:49 PM
 
Do your modules have a default View control (one with no key and with the Security Access set to View or Anonymous), or is it set with a "key".  If the module displays with "ctl=" in the querystring it takes up the whole page - ctl= is used to display the module in edit mode (usually)

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
2/13/2007 1:18 PM
 
The modules each have a view and an edit control. Security is set to registered users. Doing  some research, my modules have the DAL and the BLL in a seperate project under the DNN solution. If I create a custom module and place the code under the app_code folder in the DNN web app, then I can add my custom modules and see modules that I add after my custom one. So basically, when I have my DAL and BLL code in a seperate code project, I can only have the first custom module added to a page displayed? Is this a bug? My DLL's compile to the website/bin directory.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Can Not Add more than One Custom Module To a PageCan Not Add more than One Custom Module To 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