Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  C-sharp module development tutorial?
Previous Previous
 
Next Next
New Post 3/18/2006 12:27 AM
User is offline Craig Miller
34 posts
10th Ranked


C-sharp module development tutorial? 

I've been googling about now for a while, and haven't been able to locate an introductory tutorial on developing DNN 3.x modules with VS 2003/C#.  The only one I found just described what buttons to push, and used templates to generate the code.  I'd really like to build a "Hello World" type module from the ground up along with basic explanations of everything before I jump into using a product that generates the code automatically.

Could anyone point me to a tutorial for a C# guy working on DNN 3.x?

Thanks for the help,
Craig

 

 
New Post 3/25/2006 1:39 PM
User is offline Mark McAvoy
12 posts
www.bitethebullet.co.uk
10th Ranked


Re: C-sharp module development tutorial? 

Hi Craig

I wrote this tutorial http://www.bitethebullet.co.uk/RandomImageTutorialPart1/tabid/63/Default.aspx about how I developed a "real" module in C# for DNN 3.x

Maybe this was the one you've already seen that uses templates to generate some of the code. You could of course write some of the generated code yourself.

Regards

Mark


Visit www.bitethebullet.co.uk for more free DNN modules and tutorials
 
New Post 3/29/2006 9:33 AM
User is offline Craig Miller
34 posts
10th Ranked


Re: C-sharp module development tutorial? 

Yeah, that is the one I found already.  Some of the templates you used aren't available as a free download anymore and your tutorial didn't walk through the code they created so I'm not sure what the code that they generated looks like.  That's why I was hoping to find another tutorial -- to fill in the blanks.

I can tell that you spent a lot of time on your tutorial and I appreciate that.  My only feedback is that it read a little more like a recipe than a tutorial.  It seemed to explain what to do, but not why you do it, or how everything fits together.  That said, it is the only one available, I haven't written anything better, etc so I do appreciate that you took the time to write it up.  Thank you.

--Craig

 

 
New Post 3/30/2006 10:07 AM
User is offline Hamid Noorbakhsh
8 posts
10th Ranked


Re: C-sharp module development tutorial? 
Craig,
I am a C# guy too. Don't worry about therest of the stuff, just code your modules in C#. It will work fine. Here is a "HelloWorld" I wrote a while ago to get started. The HelloWorld.ascx file has just a label in it "Label1" and the namespace added:


<%@ Control Language="c#" AutoEventWireup="false" Codebehind="HelloWorldCS.ascx.cs" Inherits="IL.HelloWorldCS.HelloWorldCS" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <asp:Label id="Label1" runat="server" Width="88px">Label</asp:Label>

 and here is the code in HelloWorld.ascx.cs file:

namespace IL.HelloWorldCS
{
    using System;
    using System.Text;
    using System.Data;
    using System.Drawing;
    using System.Web;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;

    /// <summary>
    ///        Summary description for HelloWorldCS.
    /// </summary>
    public class HelloWorldCS : DotNetNuke.Entities.Modules.PortalModuleBase
    {
        protected System.Web.UI.WebControls.Label Label1;

        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            StringBuilder s = new StringBuilder();

            s.Append("<H2>Hello World in C#</H2>");
            s.Append("<br>This is ModuleID: " + base.ModuleId.ToString());
            s.Append("<br>This is UserID: " + base.UserId.ToString());
            s.Append("<br>This is PortalID: " + base.PortalSettings.PortalName.ToString());
            s.Append("<br>This is portal name: " + base.ModuleConfiguration.ModuleTitle.ToString());
            s.Append("<br>Are we in edit mode now: " + base.IsEditable.ToString());

            Label1.Text = s.ToString();
        }

        #region Web form Designer generated code
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web form Designer.
            //
            InitializeComponent();
            base.OnInit(e);
        }
       
        /// <summary>
        ///        Required method for Designer support - do not modify
        ///        the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion
    }
}


Nothing to it. I hope this will help you,
noorbakhsh

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  C-sharp module development tutorial?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


WDK Solutions
Quality modules for the DotNetNuke community. Check out our 'wild' modules!
wdkns.com
UK - DotNetNuke providers
UK providers of DNN module development and skin package design. Oxford Information Labs provides cost-effective solutions for businesses and organisations specialising in Skin design and bespoke module development.
www.oxil.co.uk
TronixSoft
Hosting for local businesses that want more from their websites.
www.TronixSoft.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP