How to integrate this new Modules and ControlMethods in existing Module ?

Aug 3, 2009 at 6:50 AM

Hi,

First of all, congrats for the GREAT WORK !!!

I would like to ask

  • How to integrate this new Modules and ControlMethods in existing Module ?
  • I am Loading Modules by LoadControl() Method, so that I dont have create a New DNN Key for every .ascx control that I create. How to use this new Module ( inherited from the AjaxPortalModule Class) ?
  • Can somehow, the common ajax function be put in a common file, so that every time we dont have to create control.ascx.js ? file ? ( we can inject the respective methods directly in the Head sections , i guess)
  • What about Settings. ascx ? Do we need to create AjaxModuleSetting Class ?

Thanks & Regards

Coordinator
Aug 4, 2009 at 2:15 PM
  • How to integrate this new Modules and ControlMethods in existing Module ?
  • Copy the portions of the code you want from a module generated with my template into your module.
  • I am Loading Modules by LoadControl() Method, so that I dont have create a New DNN Key for every .ascx control that I create. How to use this new Module ( inherited from the AjaxPortalModule Class) ?
  • I would assume you have a code behind for the module you are calling load control.  If not, where are you putting your server side event handler logic? 
  • Can somehow, the common ajax function be put in a common file, so that every time we dont have to create control.ascx.js ? file ? ( we can inject the respective methods directly in the Head sections , i guess)
  • Its just code.  Feel free to refactor it to whatever purpose you find necessary.  The pattern I present allows for a nice separation of code specific to each module.  If you find your code does not need this separation, then by all means, simply use a common js file to handle your logic.
  • What about Settings. ascx ? Do we need to create AjaxModuleSetting Class ?
  • Again, my template is simply a guideline for how your code could look.