Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Two controls in one module
Previous Previous
 
Next Next
New Post 2/15/2006 5:16 AM
User is offline steve conard
95 posts
10th Ranked


Two controls in one module 
I am trying to create the module through the dnn interface and manual build of cusotm web controls. i have followed this article to a t. http://15seconds.com/issue/050505.htm

Module loads with "could not load type" error. The controls I have added have no code but what is in the article. The only change is that I am trying to have two view controls within one module. The article does not cover this and I cannot seem to find the combination that does not yeild "could not load type" error.  I am trying to write a search control and a form control in view at the same time in one module.  I add a second "definition" to the module and add the control to the second definition.  Module has following error:

DotNetNuke.Services.Exceptions.ModuleLoadException: Parser Error: Could not load type 'dnnWOdb.viewDnnWOdb'. ---> System.Web.HttpParseException: Parser Error: Could not load type 'dnnWOdb.viewDnnWOdb'. ---> System.Web.HttpException: Could not load type 'dnnWOdb.viewDnnWOdb'. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase) at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective) at System.Web.UI.TemplateControlParser.ProcessMainDirective(IDictionary mainDirective) at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive) at System.Web.UI.TemplateParser.ParseStringInternal(String text) at System.Web.UI.TemplateParser.ParseString(String text, String virtualPath, String basePhysicalDir) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, String virtualPath, String basePhysicalDir) at System.Web.UI.TemplateParser.ParseFile(String filename, String virtualPath) at System.Web.UI.TemplateParser.Parse() at System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation() at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) at System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() at System.Web.UI.TemplateParser.GetParserCacheItem() at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControlParser.GetCompiledType(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.UserControlParser.GetCompiledUserControlType(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) in c:\inetpub\wwwroot\secureshares\admin\Skins\Skin.vb:line 462 --- End of inner exception stack trace ---
 
New Post 2/22/2006 7:30 PM
User is offline Trevor Mullen
20 posts
10th Ranked


Re: Two controls in one module 

Trying to put two view controls in the one module will always end in tears!

I had some similar trouble about a year ago.
I ended up putting the view modules in separate containers, and using the InterModuleCommunications thingy, that passes selections/options/parameters from one module on a page, to any other module on the same page, that has the IMC reciever code setup in it.

In the search control, you produce a result that says what the search found, and use the IMC to pass that out as a parameter.

In the form control, at startup, you check for IMC data, and if found, you populate the form, using the passed parameter to control what the user sees.

This approach gives the greatest flexibility to the objects, and the minimum amount of customisation required!

 - Trevor Mullen.

 

 
New Post 2/23/2006 5:00 AM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: Two controls in one module 
Here are two options, depending on how you want it to work:
  1. If you want to control which view a user sees (i.e. use the action menu or some link), you can simply add 2 view controls with the default having no control key and the secondary having one. Simply use NavigateUrl() with the control key to access the second.

  2. If you want two controls to be inserted into the same page, you need to add a second module definition. Take a look at the Blog module for an example of this.
Hope this helps!

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
New Post 2/28/2006 8:56 AM
User is offline Stefan Kamphuis
319 posts
www.superska.net
8th Ranked






Re: Two controls in one module 
If you want to have multiple module controls visible at the same time within one module, you could use LoadControl to dynamicly load them:

Dim TempControl As DotNetNuke.Entities.Modules.PortalModuleBase

TempControl = CType(LoadControl("~/DesktopModules/module/control.ascx") , DotNetNuke.Entities.Modules.PortalModuleBase)
TempControl.ModuleConfiguration = Me.ModuleConfiguration
TempControl.LocalResourceFile = Me.TemplateSourceDirectory _
    & DotNetNuke.Services.Localization.Localization.LocalResourceDirectory _
    & "/control.ascx.resx"

ContentPanel.Controls.Add(TempControl)


Greetz,
Stefan Kamphuis
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Two controls in one module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


WEBPC™ DotNetNuke® sites for Small Business
WEBPC™ are internet consultants and web hosters catering to the small business market.
www.webpc.biz
Perpetual Motion Interactive Systems Inc.
A solutions company specializing in Microsoft enterprise technologies.
www.perpetualmotion.ca
Icthus Technologies
Building Faith on the Internet
www.icthustech.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP