locked
Leverage UserControl in plug-able app 'modules' RRS feed

  • Question

  • User-855512874 posted



    i.
    I've read some posts that indicate that it is not possible to place ASP UserControls inside a library, they should be part of the web application.
    I'm working on some sort of web framework that allows 'modules' to be loaded that extends the functionality of the web application.
    I'm trying to figure out, (hard or easy way) how to be able to let other parties develop these 'modules' while they are still able to use a visual studio's visual designer with custom UserControl 
    to be used as part of these 'modules'.
    ('modules' are assemblies with embedded resource xml manifests, that are loaded dynamicly when all dependencies are met)
    These are the criteria:
    - User must be able to use the visual designer when building these UserControls
    - The web application that 'loads' these 'modules' should be able to detect if a 'module' is un-compilable, e.g. bad 'modules' can not bring down the hosted web-application.
    Is there a way to do this? Even if it is not in the spirit where UserControls were made for? The hard way?
    'Modules' are installed, so if necessary I can copy files during the installation, making them part of the hosting web application, but only if I now it will compile!
    Any thoughts?

    Hi.

    I've read some posts that indicate that it is not possible to place ASP UserControls inside a library, they should be part of the web application.

    Currently i'm working on some sort of web framework that allows 'modules' to be loaded that extends the functionality of the web application.

    I'm trying to figure out, (hard or easy way) how to be able to let other parties develop these 'modules' while they are still able to use a visual studio's visual designer with custom UserControl to be used as part of these 'modules'.

    ('modules' are assemblies with embedded resource xml manifests, that are loaded dynamicly when all dependencies are met)

    These are the criteria:

    - User must be able to use the visual designer when building these UserControls

    - The web application that 'loads' these 'modules' should be able to detect if a 'module' is un-compilable, e.g. bad 'modules' can not bring down the hosted web-application.

    Is there a way to do this? Even if it is not in the spirit where UserControls were made for? The hard way?

    'Modules' are installed, so if necessary I can copy files during the installation, making them part of the hosting web application, but only if I know it will compile!

    Any thoughts?



    Monday, May 3, 2010 12:57 AM

Answers

  • User-1704326042 posted

    Hello rene,


    What you are trying to do, is on the contrary, a good conception. 

    To get inspiration, take a look at dotnetnuke, which works very much the same way you are trying to implement your modules.

    Key features : LoadControl method on a page, package all files and resources for deployment, have a tool or process which handles the installation of the package.

    I have used this technique developing on DotNetNuke, and it is very flexible.

    For source code, I wish I could find older versions of it with source code.

    Custom web controls, are more geared towards components, as it is less flexible to develop modules using custom webcontrols techniques.

    For compilation, I beleive using MSBuild would help, but not sure at this point, as I have not gone this far myself.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 3, 2010 4:01 AM

All replies

  • User-1704326042 posted

    Hello rene,


    What you are trying to do, is on the contrary, a good conception. 

    To get inspiration, take a look at dotnetnuke, which works very much the same way you are trying to implement your modules.

    Key features : LoadControl method on a page, package all files and resources for deployment, have a tool or process which handles the installation of the package.

    I have used this technique developing on DotNetNuke, and it is very flexible.

    For source code, I wish I could find older versions of it with source code.

    Custom web controls, are more geared towards components, as it is less flexible to develop modules using custom webcontrols techniques.

    For compilation, I beleive using MSBuild would help, but not sure at this point, as I have not gone this far myself.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 3, 2010 4:01 AM
  • User-855512874 posted

    Thanks,


    I found the LoadControl feature, and it seems to works perfectly.

    This is what I was looking for.

    I've seen DotNetNuke as a user, didn't look in the source yet.

    It's a great inspiration for what I'm doing, and especially what I am doing different ;-)

    Thanks, 

    greetings,

    René.

    Monday, May 3, 2010 7:13 AM