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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0C# module exampleC# module example
Previous
 
Next
New Post
1/5/2006 11:36 AM
 
I haven't been able to get a C# module to build via the add item then I pick the dnn module and switch the language to c#. It then puts c# files into the app code and other folders inside the dnn project which of course is in vb and that definitely isn't going to compile. Anyone have a link to a C# module walk through? in dnn4!
 
New Post
1/5/2006 2:09 PM
 

I got it to work, I just tried on a clean install and it worked, I didn't see you can intermix c# and vb files in VS 2005 in the same project, cool stuff.

 
New Post
1/5/2006 3:47 PM
 
If you look at the Documentation.html file that opens when you add a Module Item, it notes that you need to add a <codeSubDirectories> node to your web.config in order to get the C# module to build.

As ASP.NET v2 builds an assembly for each page and each <codeSubDirectory> then these assemblies can be in a different language.

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
6/27/2008 3:24 AM
 

To code in C#  You have to do the

1.Create a folder under Desktopmodule

2.Inside the newly created directory add a web user control

3.While adding the web user control select the programming language as visual C#

4.Put the controls in the web user control

5. Double click on the web user control to go to the code window.

6. Add the dotnetnuke name space.

7.Inherit the partial class from DotNetNuke.Entities.Modules.PortModuleBase(Eg: partial class DesktopModules_Jithin_Jithin : DotNetNuke.Entities.Modules.PortalModuleBase)

8.Write the code to manipulate the user control.

9..Modify the web.confog like this

codeSubDirectories>

<

</

This node is coming under <system.web><compilation>

10. Sometimes you may need to create an empty folder with the same name of the module folder.

11.Now build the website.

Now module is ready for installation.

(If you set the security and permissions properly you can open the website in browser and configure it.)

codeSubDirectories> 

add directoryName="Your Directory Name" />

<

public

 
New Post
6/27/2008 4:41 AM
 

To code in C#  You have to do the

1.Create a folder under Desktopmodule

2.Inside the newly created directory add a web user control

3.While adding the web user control select the programming language as visual C#

4.Put the controls in the web user control

5. Double click on the web user control to go to the code window.

6. Add the dotnetnuke name space.

7.Inherit the partial class from DotNetNuke.Entities.Modules.PortModuleBase(Eg: partial class DesktopModules_Jithin_Jithin :

DotNetNuke.Entities.Modules.PortalModuleBase)

8.Write the code to manipulate the user control.

9..Modify the web.confog like this

<codeSubDirectories>
<add directoryName="Your Module Name" />
</codeSubDirectories>


This node is coming under <system.web><compilation>

10. Sometimes you may need to create an empty folder with the same name as the module folder.

11.Build the website.

Now module is ready for installation.

(If you set the security and permissions properly and created a virtual directory you can open the website in browser and

configure it.)

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0C# module exampleC# module example


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