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  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Iron Speed Designer is a software development tool for building database, reporting, and forms applications for .NET without hand-coding.
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Need Help Programming Module in C#
Previous Previous
 
Next Next
New Post 5/19/2006 8:50 AM
User is offline Matthias Schlomann
1273 posts
www.taunusstein.org
6th Ranked








Need Help Programming Module in C# 

Hello I am on Programming a Module für Shoutcast Server info.  And I have a Problem with the settings.aspx.cs

I have to post 3 Module settings.  But in the example is onli one providet.  Now I think have a Problem with the Catch, and Module controller.

Here is the code.

 */

using System;
using System.Web.UI;

using DotNetNuke;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Exceptions;

namespace YourCompany.Modules.ShoutcastStats
{
    /// -----------------------------------------------------------------------------
    /// <summary>
    /// The Settings class manages Module Settings
    /// </summary>
    /// <remarks>
    /// </remarks>
    /// <history>
    /// </history>
    /// -----------------------------------------------------------------------------
    partial class Settings : ModuleSettingsBase
    {

        #region Base Method Implementations

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// LoadSettings loads the settings from the Database and displays them
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// </history>
        /// -----------------------------------------------------------------------------
        public override void LoadSettings()
        {
            try
            {
                if (Page.IsPostBack == false)
                {
                    if ((string)TabModuleSettings["Server"] != null)
                    {
                        Server.Text = (string)TabModuleSettings["Server"];
                    }
                catch (Exception exc) //Module faild to load
                    {
                if ((string)TabModuleSettings["Port"] != null)
                    {
                        Port.Text = (string)TabModuleSettings["Port"];
                    }
                }
            catch (Exception exc) //Module faild to load
            {
                if ((string)TabModuleSettings["Pass"] != null)
                    {
                        Pass.Text = (string)TabModuleSettings["Pass"];
                    }
             }
            catch (Exception exc) //Module failed to load           
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
        }
    }


        /// -----------------------------------------------------------------------------
        /// <summary>
        /// UpdateSettings saves the modified settings to the Database
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// </history>
        /// -----------------------------------------------------------------------------
        public override void UpdateSettings()
        {
            try
            {
                ModuleController objModules = new ModuleController();
                objModules.UpdateTabModuleSetting(TabModuleId, "Server", Server.Text);
            }
            {
                ModuleController objModules = new ModuleController();
                objModules.UpdateTabModuleSetting(TabModuleId, "Port", Port.Text);
            }
            {
                ModuleController objModules = new ModuleController();
                objModules.UpdateTabModuleSetting(TabModuleId, "Pass", Pass.Text);
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
           
        }

        #endregion

    }
}


Please Help

Thanks

Matthias


Regards
Matthias
www.moonlightradio.net
 
New Post 5/25/2006 12:02 PM
User is offline Michael Flanakin
994 posts
www.michaelflanakin.com
7th Ranked




Re: Need Help Programming Module in C# 
The code you have shouldn't even compile. Try having a look at one of the core modules. The source is provided on the project downloads page for the respective project. Check out the Links Module, for instance - it uses 3 or 4 settings, I believe.

Michael Flanakin | Microsoft Consulting Services
www.michaelflanakin.com
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Need Help Programming Module in C#
 


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.

 


TronixSoft
Hosting for local businesses that want more from their websites.
www.TronixSoft.com
The Forerunner Network
The Forerunner Network consists of a group of Dynamic Website & Interactive Membership Portal hosting services that are managed by Forerunner Communications. Our services span a wide range of markets and enable individuals, organizations and businesses to build and manage dynamic, interactive portals and websites.
The Forerunner Network
ZLDNN.COM
We provide commercial DotNetNuke modules.
www.zldnn.com

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