New free DNN module lets you add your own code easily.
phdcc.CodeModule is a new free DotNetNuke (DNN) 4
module that provides a simple way to add your own program code (and custom HTML) to a DNN site without having to write
a full module or resort to using an IFRAME. Full info at www.phdcc.com/phdcc.CodeModule/
For example, save the following code as "view1.ascx" and upload it to the "DesktopModules\phdcc.CodeModule" directory using FTP or [Admin][File Manager].
<%@ Control Language="VB" ClassName="view1" %>
If Not Page.IsPostBack Then
lblSetInCode.Text = "I was set in code"
<asp:Label ID="lblSetInCode" runat="server" /><br />
<% Literal1.Text = "I was set in <code>view1.ascx</code>" %>
<asp:Literal ID="Literal1" runat="server" />
Next, add a phdcc.CodeModule module to a DNN page and then, using the Settings page, specify your file as: "view1.ascx".
Your code will produce the following output:
I was set in code
I was set in view1.ascx
Your code can be written in VB or C# and do anything that ASP.NET code can do, including accessing Session variables. Because it runs in DNN, you can use DNN methods such as UserController.GetUser() and can access the DNN database. Warning : if you install this module, be careful who you allow to access these powerful facilities.
phdcc.CodeModule v01.00.02 is available to use for free from PHD Computer Consultants Ltd, England UK. Download from
A future version will allow you to edit your code online, rather than having to upload it.
Based in Cumbria, England UK since 1994, PHD Computer Consultants Ltd (PHDCC) specialises in e-media tools for CDs, DVDs and web sites, and e-publishing services. The company has a strong consultancy and custom programming background in software, hardware and system design for PCs and other platforms.
All product or service names mentioned herein are the trademarks of their respective owners.
phdcc, PHD Computer Consultants Ltd, www.phdcc.com
Lake View, Bampton, Penrith CA10 2QU, Tel: 01314634131, Email: firstname.lastname@example.org.