The Engage Weblog

Brian Dukes
Brian Dukes has been working with Engage professionally since 2006, but has been writing code since around 1998. Brian is very passionate about writing code that is easily maintainable, and helping others to do the same. He has been a leader in the DotNetNuke Community, and can often be found speaking at conferences and helping others on twitter, github, and stackoverflow. DNN recognized his community efforts by awarding him the DNN MVP in 2012. Outside of work, Brian spends time with his family, serves Jesus at City Lights Church, as well as supporting social justice, fair trade, local, seasonable food, and international adoption.

Getting the current PortalId outside of PortalModuleBase

by bdukes on Friday, December 14, 2007 12:56 PM

It's occasionally tricky/troublesome to pass the current Portald from your DotNetNuke control that inherits PortalModuleBase so that it can be used in your business object logic. A trick that I learned looking at another developer's code recently is to get the current PortalId from PortalController.GetCurrentPortalSettings().PortalId. CurrentPortalSettings is set for every request, so it is always the value that you are looking for.

Hope it helps,

Compiling against an older version of DotNetNuke

by bdukes on Friday, December 14, 2007 12:49 PM

I tend to run one of the latest versions of DotNetNuke for my development website, however I still want to compile against an older version so that my assemblies are compatible with the older versions.  So, I create a folder outside of my website (C:\Assemblies) with a directory for each version of DNN (and the Ajax Control Toolkit) that I might want to target.  I fill each directory with the contents of the bin folder from the DNN install (or Ajax Control Toolkit website), and then set a resource path in my project that points to that specific directory.  Voila, running 4.7.0, compiling against 4.5.1.

You'll need to make sure that your project doesn't set the Copy Local property on each reference, since that'll copy the old assembly over the new assembly and break your website.

Hope it helps,

DataTable Visualizer Failure

by bdukes on Tuesday, December 4, 2007 8:56 AM
Best practices for developing DotNetNuke modules dictates that we use the development.config as our web.config, which includes running our development sites under Medium Trust.  This is necessary so that we don't inadvertently introduce code that requires Full Trust into our module and thereby restrict it to customers running in Medium Trust.

However, while in Medium Trust, certain data visualizers in Visual Studio don't work (namely, the DataTable and DataSet visualizers).  You'll see a message like "The application you are debugging has insufficient privileges to allow the use of custom visualizers. Please see the documentation for the list of required privileges."  I've been occasionally frustrated for a number of months because I couldn't figure out why Visual Studio was barking at me when all I wanted to do was use their built-in visualizer.  Finally, I found this forum post and saw the root of the problem.  So, now I know, if I need to debug...

Engage: Rotator 1.1.2 Released

by bdukes on Monday, November 12, 2007 1:44 PM

We have just released a minor update to Engage: Rotator, our content rotating module for DotNetNuke.  This fixes issues some folks were seeing where content would "jump" a bit when it was rotating.  If you don't already have it, pick up a copy from our Buy Now page on Engage Modules.

Engage: Employment Version 1.1.2 Released

by bdukes on Wednesday, November 7, 2007 12:14 PM

Version 1.1.2 of Engage: Employment has been released to the web.  It is currently available from, and will be available from SnowCovered before too long.  See the Downloads page of for instructions on how to get access to the new version there if you have purchased from another website.

Verison 1.1.2 is a minor release which addresses an issue with email validation when applying for jobs.

Tulsa Tech Fest 2007 - Learnings

by bdukes on Friday, October 26, 2007 2:17 PM
Last weekend most of us from Engage went down to enjoy the Tulsa Tech Fest.  While the individual sessions were hit or miss, the keynotes were excellent and got us all excited to start using Silverlight, and we all definitely had fun together.

One of the topics in which I have been becoming more and more interested is the concept of Test Driven Development (TDD) and the Model View Controller\Presenter (MVC\MVP) frameworks that enable it.  I attended a few sessions on related topics, and was disappointed to learn that there seems to be little opportunity to use MVC (and, specifically, the new MVC Framework that Microsoft is developing) in DotNetNuke development.  But, I did take away some of the more general principles that make these patterns and practices useful, and hope to continue being able to integrate...

Engage: Rotator Version 1.1.0 Is Released

by bdukes on Friday, October 12, 2007 7:21 AM

On Wednesday of this week, we made our first public release of Engage: Rotator on Engage Modules.  If you've wondered about that snazzy looking rotating banner on the front page of Engage Software, this is it.  This is a product that has evolved over the last few months from the needs of various clients, and has now come to the point where we've invested a lot of time in making it user friendly and configurable.  Have a look on our demo site and see if this could help add a nice touch to your site.

Don't Like What DotNetNuke has to say?

by bdukes on Tuesday, August 28, 2007 8:16 AM
Have you ever wanted to change what DotNetNuke says on it's controls? Change "Register" to "Join Us" or "Terms of Use" to "Member Agreement"? It's easier than you think.

How To: Get the size of an image (remote or local)

by bdukes on Friday, August 17, 2007 9:32 AM
It often happens that I would like to know the size of an image so that I can smartly resize it in various situations. Until today, I had never been quite able to get everything that I needed to get it done.

SelectedIndexChanged and ASP.NET AJAX

by bdukes on Thursday, July 19, 2007 6:28 AM
Using a DropDownList, RadioButtonList, CheckBoxList, or other similar control as a trigger of an Update Panel (rather than in the Update Panel itself) will cause the initial value not to fire a SelectedIndexChanged event.

Debugging JavaScript on Internet Explorer

by bdukes on Thursday, May 17, 2007 12:53 PM
If you're anything like me, you've been greatly looking forward to Visual Studio Orcas, with its enhanced support for JavaScript.  You might also not know that some of that functionality is available to us currently in Visual Studio 2005.  It's not exactly easy to setup and use, but once you get it going, it can really help out when you're trying to figure out why, for example, all elements on your page suddenly disappear, only in IE.

Using this Knowledge Base article as a starting point,, I was able to get up, running, and debugging.  The first step is to enable debugging from Internet Explorer, by unchecking the "Disable Script Debugging (Internet Explorer)" box in IE's Advanced Options.  Then, in order to actually set a breakpoint and step into your javascript code, you'll need to use the debugger keyword in your code.  Just put that statement in your script wherever you would like the debugger to break, and...

JavaScript Basics

by bdukes on Monday, May 7, 2007 3:07 PM
Working on web sites, I've come across the need, more and more, to be using JavaScript to make an application run more smoothly.  Unfortunately, I have absolutely no training in JavaScript, which means most of what I write does the job, but misses a number of the essentials.  Fortunately, there is hope.  If you, like me, didn't know that JavaScript objects are dictionaries, or that JavaScript inheritance is between objects, not classes, you should check out Ray Djajadinata's article for MSDN Magazine, Create Advanced Web Applications with Object-Oriented Techniques in JavaScript.  It really helped me to understand some more of all of this JavaScript craziness that I always saw but never understood.


Debugger Attributes

by bdukes on Thursday, April 12, 2007 6:19 AM
When developing code for .NET, there are a number of attributes that you can define on parts of your code to make your job easier while you are debugging. These are new in .NET 2.0, and part of the System.Diagnostics namespace.

Some Visual Studio Tools

by bdukes on Thursday, March 1, 2007 2:11 PM
Yesterday, version four of the Visual Studio 2005 SDK was released (as noted in this blog post, V4 VS SDK Targeting VS 2005 Released!).  While I don't plan on developing any Visual Studio add-ins or extensions, I noticed that the SDK included SandCastle, which is a tool to build documentation based on your inline XML comments.  If you're working with large or distant groups, it can help to compile some of your work into a readable API document, and SandCastle will do that for you.  You'll need to go to to get an automation script or GUI, since this release doesn't include any interface.  Get it here: Visual Studio 2005 SDK version 4.0.

Also released recently was the March CTP for Visual Studio Codename "Orcas."  This release includes a number of pretty cool updates to the IDE, including the new web form editor...

Creating a "Rated" style for the Rating control

by bdukes on Monday, February 26, 2007 1:44 PM
The Rating control from the AjaxControlToolkit has been of use to use as we work on some of our websites that use our Engage: Publish module.  However, we needed to make a change to the style of the container around the Rating in order to change a background image from saying "Please rate!" to "Thanks for rating."  We tried wrapping it in an UpdatePanel to get at the CssClass, but we couldn't get it to react.  Eventually, we got the following javascript to work (which needs to be declared after divRating is declared).