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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Module can't find file /UserControls/MyUserControl.ascxModule can't find file /UserControls/MyUserControl.ascx
Previous
 
Next
New Post
3/4/2013 7:46 PM
 

I'm just trying to add a simple UserControl within my module, but I keep getting an error that the file doesn't exist. For example, I added a new directory and file:

/UserControls/MyUserControl.ascx
namespace CompanyName.MyModule.UserControls

Is there something I need to do when creating new directories within DNN modules that I'm not aware of? I tried adding it to the manifest file as a moduleControl but that didn't change anything.

Thanks

 
New Post
3/5/2013 4:04 AM
 
Hi,

if you develop your own modules, the should be placed under DesktopModules - and the user controls (ascx files) should inherit DotNetNuke.Entities.Modules.PortalModuleBase (instead of System.Web.UI.UserControl)

Best wishes
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
3/5/2013 11:35 AM
 

Thanks Michael, I should have been more clear. In a module I'm developing for DNN 6.2.6 using Christoc module template I added a directory for other user controls. I built a custom DropDownList control that I want to use throughout this module. It looks like this:

root/DesktopModules/MyModule/UserControls/DropDownList.ascx

I'm trying to use this control in my View.ascx control and I added it via the page directive - nothing unusual here, and I can even browse for DropDownList.ascx using Intellisense after I start to type Src="", so I know it's there, and VS2010 can see it.

Any ideas why it's giving me problems? Thanks

 
New Post
3/5/2013 11:48 AM
 

Ok, this is only slightly embarrassing. The issue was with relying on Intellisense... VS2010 added "~/" in front of UserControls so the app was looking for the UserControls directory in the root of the site, rather than the root of the module... yeah.

Wrong: <%@ Register Src="~/UserControls/DropDownList.ascx"...

Right: <%@ Register Src="UserControls/DropDownList.ascx"...

 
New Post
3/27/2013 10:10 AM
 

I can add  a new usercontrol to the solution, but the dropdownlist on the second usercontrol doesn't render correctly.

It is missing the drop down arrow on the right hand side.

When I put a dropdownlist on the view.ascx page, it looks right, but when I bring in the 2nd user control into view.ascx the dropdown doesn't look right.

Any thoughts

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Module can't find file /UserControls/MyUserControl.ascxModule can't find file /UserControls/MyUserControl.ascx


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