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 ExtensionsModulesModulesDNN controls in designer, particularly auditDNN controls in designer, particularly audit
Previous
 
Next
New Post
5/14/2014 8:25 PM
 

I'm working through moving modules to DNN7, VS2013, and sometimes converting to C#.  One thing that I'm struggling with is the ModuleAuditControl. Back in the DNN3 days I had a "custom" version that had username and time for both insert and update. That's not necessary anymore, but I can't find an example of using ModuleAuditControl in the designer so it shows up in Intellesense so I can see what the properties are. I see the source ASCX in the full source, but I don't see the source codebehind.

So as a result the names I picked way back when don't match the official version and my code doesn't compile. I can't find doc, or an example, so I either keep my "custom" version which seems silly, or find somewhere current it's being used (harder than I thought).

Now I will say I don't have any DNN controls in the designer, but since I have tons of examples it's not been an issue. I'd like to do that too, so maybe someone can help be kill two birds with one stone (pun intended).

 
New Post
5/15/2014 4:50 AM
 
you can either browse to the file itself i.e. DNN Platform\Library\UI\UserControls\ModuleAuditControl.cs in the source (or view the current version at https://github.com/dnnsoftware/Dnn.Pl... ), but if you've in vs.net the easiest thing to do is to use the object browser (view->object browser) and enter the type and vs.net will show you the details (you can change the object browser to only show public properties if that's all you care about)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
5/15/2014 9:46 AM
 

Thanks for the source link so I have the correct names, but the core problem seems to be specific to the upgrades to VS2013. In the "good old days" I referenced ctlAudit.something , with this in the .ascx file:

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

<dnn:audit id="ctlAudit" runat="server" />

The old projects didn't have a .designer file and although I've managed to get most of it corrected the DNN controls are problematic. If I reference ctlAudit in the code it's undefined, so I assume I need to get it into the designer, but making updates to the .ascx doesn't put references to ModuleAudit there and I don't see it in the Toolbox. I also get this on the label and audit controls:

Warning 88 Element 'audit' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. C:\Users\Keith Stone.CREWSTONE\Documents\My Web Sites\DNN720\DesktopModules\RaceBaseCS\EditEntrant.ascx 762 6 RaceBaseCS

Warning 1 Element 'label' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. C:\Users\Keith Stone.CREWSTONE\Documents\My Web Sites\DNN720\DesktopModules\RaceBaseCS\EditEntrant.ascx 8 6 RaceBaseCS

I get the same in VB, but I also get a bunch of these also:

Warning 16 Namespace or type specified in the Imports 'DotNetNuke' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. C:\Users\Keith Stone.CREWSTONE\Documents\My Web Sites\DNN720\DesktopModules\RaceBaseVB\EntrantResultsView.ascx 205 12 RaceBaseVB

 

Now I can get these modules to work, just without the DNN controls.





 

 
New Post
5/15/2014 5:41 PM
 

OK, what I ended up doing was brute forcing the control definition into the .designer file:

        /// <summary>

        /// ctlAudit control.

        /// </summary>

        /// <remarks>

        /// Auto-generated field.

        /// To modify move field declaration from designer file to code-behind file.

        /// </remarks>

        protected global::DotNetNuke.UI.UserControls.ModuleAuditControl ctlAudit;

May not be pretty, but then I can use it and it compiles clean. I can force that definition when I auto generate the .designer files in my CodeSmith templates, but I guess the only option is brute force when you create a page form scratch.

 
New Post
5/19/2014 5:52 AM
 
you can set the application url and then dnn can navigate to the definition - see http://mitchelsellers.com/blogs/2009/...

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN controls in designer, particularly auditDNN controls in designer, particularly audit


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