Tag Archives: module development

failed to generate InfoClass using myGeneration

I try to use myGeneration code generator for DNN module prototype. My god!  It not able to display the tables of DNN database which I m just setup! After playing around with the tool. I found out the database name playing very important role here! Here the step I tried.

DB name = DNN4.6.2 ( Not able to display tables)
DB name = DNN4.6 ( Also not able to display tables)
DB name = DNN4 ( Finally able display tables)
DB name = DNN462 ( Yes, can able display tables)

Conclusion, Please dont put a ‘dot’ for your database’s name if you wish to use myGeneration to generate the code to speed up the development!

DotNetNuke Module Development

For those who wish to learn or know more about DNN module development but do not know where to start.

Here the link for you to start.

  1. Creating a DNN Module and Understanding DNN Architectural Approach [Click Here]
  2. Creating a DotNetNuke® Module – For Absolute Beginners [Click Here]
  3. Creating a Super-Fast and Super-Easy DotNetNuke® Module – for Absolute Beginners [Click Here]

Before launch your visual studio.NET 2005, please make sure you installed the DNN template & starter kit which you can find it [here], also DNN Source Code Version which you can download from [www.dotnetnuke.com]

Multiple controls with the same ID “x” were found in DNN

“Multiple controls with the same ID ‘x’ were found. FindControl requires that controls have unique IDs.”

Solutions, go to HOST -> Module Defination.
Click on the Modules you deployed or developed.
Make sure the default page only ONE.

I went to check mine got 2 default page. That’s why i got such error.

Incoming search terms:

DNN Module DLL not reflected after deployed

Case Study:

After I deployed to UAT or QA server. The DNN Custom Module reflected correctly but not the DLL. I found that’s an extra folder called “Module” in Bin Folder.

I read through the .DNN file, I found thats a line

<supportsprobingprivatepath>True</supportsprobingprivatepath>

You just need to remove it, and then redeploy again, the Module’s DLL will reflect correctly.

SqlHelper.ExecuteScalar in DotNetNuke Modules

To deal with a complex business logic, you may write complex T-SQL in stored procedure. It may return -9, -5, -1, 0, 1, 2…. and so on.

We have to use SqlHelper.ExecuteScalar instead of SqlHelper.ExecuteNonQuery.

Example,

public override long DeleteUser(long callingUserId, long userId)
{
SqlParameter[] paramArray = new SqlParameter[3];
paramArray[0] = new SqlParameter("@piCallingUserId", callingUserId);
paramArray[1] = new SqlParameter("@piDeletedUserId", userId);

paramArray[2] = new SqlParameter("@oiRetVal", 99);

paramArray[2].Direction = ParameterDirection.Output;

SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, GetFullyQualifiedName("User_Del_User"), paramArray);

return long.Parse(paramArray[2].Value.ToString());
}

Incoming search terms:

add meta tag in DotNetNuke

If you wish to add a meta tag in DotNetNuke, here the step to do it.

Go to Admin tab –> Page –> Click the page (home tab, for instance) –> the Page Settings –> Advanced Settings –> Page Header Tags

Enter the content you require, ie. I use this feature to date each of the pages for the search engines:

<meta name="example" content="example" />

Incoming search terms:

DNN Module Localization

Thats 2 ways i found for DNN Module Localization,

first is using ResourceKey without involve Code Behind in ACSX, example code

<asp:Label Id="lblPageTitle" runat="server" ResourceKey="lblPageTitle"/>

Another way is using Code Behind, sample code is

ASCX page,

<asp:Label Id="lblPageTitle" runat="server"/>

Code Behind,

<lblPageTitle.Text =Localization.GetString("lblPageTitle", this.LocalResourceFile);

Incoming search terms:

Develop DNN Module with Visual Studio 2005 Web Application Project

That’s many ways to develop DotNetNuke module. You can install DotNetNuke template for Visual Studio 2005, launch the Visual Studio and then open the DotNetNuke solution to start develop in desktopmodule directory and App_Code directory.

That is another way to develop the DotNetNuke Module without open the DotNetNuke solution, but you need to install the Visual Studio 2005 web application project.

Related Posts with Thumbnails
Get Adobe Flash player