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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUnable to use the same Web User Control in two different modules?Unable to use the same Web User Control in two different modules?
Previous
 
Next
New Post
2/18/2010 12:03 PM
 

 I am developing a number of modules for a client that will share some user interface functionality using a common Web User Control to provide the UI. When I wrote the first module and added in the .ascx file, all was fine. When I add the same control to the second module, I get the following error:

DotNetNuke.Services.Exceptions.ModuleLoadException: The type 'XXX.ParametersControl.ParameterTabControl' is ambiguous: it could come from assembly 'C:\Clients\XXX\Code\Reporting\DotNetNuke_BaseInstall\bin\XXX.KPI_Configurable_Chart.DLL' or from assembly 'C:\Clients\XXX\Code\Reporting\DotNetNuke_BaseInstall\bin\XXX.Survey_Grid.DLL'. Please specify the assembly explicitly in the type name.

Both modules install and run just fine without this additional UI control.

I developed the UI control as a separate project that compiles it's own DLL for the included back end functionality, then deploy the application with just the compiled DLL and the control ASCX file in the module install files. 

The include into the main module ASCX is done this way:

 

<%@ Register src="ParameterControl/ParameterTabControl.ascx" tagname="ParameterTabControl" tagprefix="uc1" %>
<uc1:ParameterTabControl ID="ParameterTabControl1" runat="server" />

 

As you can see, I include the interface control by getting it from a subdirectory, which I implement as a Subversion external.

I reference the control's objects and properties in the main module's .vb codebehind like this:

                ParameterTabControl1.DateRangeTabVisible = True
                If (ParameterTabControl1.StartDate Is Nothing) Then
                    ParameterTabControl1.StartDate = DateAdd(DateInterval.Day, -90, Now)
                End If

Any tips on how to engineer this so it doesn't happen? Some way to get the sub-control ASCX to connect only to it's own DLL and not be bound to the main module control while still allowing me to query properties and objects on the control to set and get it's properties? 

 

 
New Post
7/4/2014 2:25 AM
 
i have the same problem. How did you solve this?
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUnable to use the same Web User Control in two different modules?Unable to use the same Web User Control in two different modules?


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