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...Getting StartedGetting StartedFirst DNN Module Attempt - Could not load typeFirst DNN Module Attempt - Could not load type
Previous
 
Next
New Post
11/15/2010 8:28 PM
 
Hello,

Trying my very first attempt at creating an AJAX module following a tutuorial I found online.

I created a .ascx control:

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Test.ascx.vb" Inherits="AJAX_Test" %>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true"></asp:DropDownList> 
 X 
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true"></asp:DropDownList>
 = 
<asp:Label ID="Label1" runat="server"></asp:Label>

The Code Behind:
Imports DotNetNuke
Public Class AJAX_Test
    Inherits Entities.Modules.PortalModuleBase
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            For Counter As Integer = 0 To 99
                DropDownList1.Items.Add(Counter.ToString)
                DropDownList2.Items.Add(Counter.ToString)
            Next
        End If
    End Sub
    Protected Sub DropDownList_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged, DropDownList2.SelectedIndexChanged
        Label1.Text = (Integer.Parse(DropDownList1.SelectedValue) * Integer.Parse(DropDownList2.SelectedValue)).ToString
    End Sub
End Class

Created a new module definition from a Control.

Upon trying to view it, I get the following error:

ModuleId: 1045
ModuleDefId: 181
FriendlyName: AJAX Test
ModuleControlSource: DesktopModules/AJAX Test/Test.ascx
AssemblyVersion: 5.5.1
PortalID: 0
PortalName: TheDynoRoom.com
UserID: 1
UserName: host
ActiveTabID: 453
ActiveTabName: Test Module 2
RawURL: /dynodnn/TestModule2.aspx?__U=1289870524268
AbsoluteURL: /DynoDNN/Default.aspx
AbsoluteURLReferrer
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.200 Safari/534.10
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: b9a74415-1c1a-43b8-8aa7-d61246cef833
InnerException: Could not load type 'AJAX_Test'.
FileName
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.UI.TemplateParser.GetType
StackTrace
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Could not load type 'AJAX_Test'. ---> System.Web.HttpParseException: Could not load type 'AJAX_Test'. ---> System.Web.HttpParseException: Could not load type 'AJAX_Test'. ---> System.Web.HttpException: Could not load type 'AJAX_Test'. at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError) at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly) at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.ParseInternal() at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath) at DotNetNuke.UI.ControlUtilities.LoadControl[T](TemplateControl containerControl, String ControlSrc) at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---
Source
Server Name: CRICHARDSONV


Any help is much appreciated.
 
New Post
11/16/2010 12:53 AM
 
I think I misunderstood the tutorial I was reading. They must have been working in an environment that used the whole DNN instance source code and it compiled the whole site.

I just tried to copy a .ascx control into a DesktopModules/Test folder...so there was no .dll compiled...I guess. 

Not sure if that should work or not. So instead, I built a module using the Starter Kit, compiled, and deployed, and installed it into DNN and it worked.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedFirst DNN Module Attempt - Could not load typeFirst DNN Module Attempt - Could not load type


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