Friday, February 10, 2012
Register
  DNN HomeProductsphdcc.Data Example formsphdcc.Data Example resultsDownloads
Products » phdcc.CodeModule   Search
phdcc.CodeModule

phdcc.CodeModule 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. Write your own ASP.NET/DNN code and HTML in a simple ascx user control - have it displayed by phdcc.CodeModule.

Free Download displays "Powered by" message - the US$10 retail version with full source does not have this.

The Retail version also supports skin-tokens, where [CODEMODULE] in an HTML skin file is replaced with the output from your code file defined by the "ControlFile" setting in the skin.xml file - for example, see the text at the bottom of this page "I am phdcc.CodeModule that is part of the skin".

Full documentation

phdcc.CodeModule module example
Hello
Name:
Your name is unknown

The above output was generated using the following code:

<%@ Control Language="VB" ClassName="view7" %>

<%@ Import Namespace="DotNetNuke.Entities.Users" %>

<script runat="server">

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  If Not Page.IsPostBack Then
    lblGiven.Text = "unknown"
  End If
End Sub

Protected Sub btnGo_Click(ByVal sender As Object, ByVal e As System.EventArgs)
  If txtName.Text.Length > 0 Then
    lblGiven.Text = txtName.Text
  End If
End Sub

</script>

Hello <% =UserController.GetCurrentUserInfo.Username%>
<br />
Name: <asp:TextBox ID="TextBox1" runat="server" />
<asp:Button id="Button1" runat="server" Text="Go" OnClick="btnGo_Click" />
<br />
Your name is <asp:Label ID="Label1" runat="server" />
Same example in free version
Hello
Name:
Your name is unknown

The above output was generated using the following code:

<%@ Control Language="VB" ClassName="view7" %>

<%@ Import Namespace="DotNetNuke.Entities.Users" %>

<script runat="server">

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  If Not Page.IsPostBack Then
    lblGiven.Text = "unknown"
  End If
End Sub

Protected Sub btnGo_Click(ByVal sender As Object, ByVal e As System.EventArgs)
  If txtName.Text.Length > 0 Then
    lblGiven.Text = txtName.Text
  End If
End Sub

</script>

Hello <% =UserController.GetCurrentUserInfo.Username%>
<br />
Name: <asp:TextBox ID="TextBox1" runat="server" />
<asp:Button id="Button1" runat="server" Text="Go" OnClick="btnGo_Click" />
<br />
Your name is <asp:Label ID="Label1" runat="server" />

Powered by phdcc.CodeModuleFree 01.01.03

I am phdcc.CodeModule that is part of the skin