Finally, we can [download] the c# source code for DotNetNuke Portal.
This is not a fully tested application. So use it as your own risk.
You can go to [DNN Forum] to discuss this topic.
Finally, we can [download] the c# source code for DotNetNuke Portal.
This is not a fully tested application. So use it as your own risk.
You can go to [DNN Forum] to discuss this topic.
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!
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.
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. 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.
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.
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());
}
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" />
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);
Seem like another DNN developer already created the C# compiled module Starter Kit for DNN4.x, this is very useful for those who want to develop the DNN module without open the DotNetNuke Project.
Here the link for you to download the starter kit.
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.