LoadControl problem - External Controls

Discussion in '.NET' started by lennart, Apr 24, 2010.

  1. lennart

    lennart

    Joined:
    Apr 24, 2010
    Messages:
    2
    Hi

    I have been using the LoadControl for ages but has recently got a problem in a new project

    I have created a small CMS system where users should be able to create their own controls to extend the system, but when I load the controls using the LoadControl method I get an error "Could not load type xxx"

    I have googled for too long now and hope for some help.

    This is what I want to do.

    The Website is installed on my server. The users sign up and get their own website area. It comes standard with a lot of controls, but I want to be able to let the users extend it further. Somewhat like DotNetNuke

    When the user has created their control they should upload it to a folder on the website. ie. Users/12/Controls/

    The user uploads the ascx and cx and designer files to the folder. Just like the Visual Studio 2008. The site is running .NET 3.5

    The I could like to load the control when their page is displayed, but this is where the problem starts.

    I simply can get it to load. Does the control needs to be compiled and how do I do this ? or am I missing something vital.

    I really hope for your help on this one.

    Cheers
    Lennart
     
    lennart, Apr 24, 2010
    #1
    1. Advertising

  2. lennart

    lennart

    Joined:
    Apr 24, 2010
    Messages:
    2
    Found the solution

    hi

    I searched again and found this super cool article. Its so simple and the drawbacks are none, as far as I can see. This is real reuse without the need to compile to single assemblies or using ParseControl.

    The solution is the AssemblyResourceProvider. Look at the link here.

    But I cant add links to this post so search google for
    "ASP.NET: Reusing Web User Controls and Forms"

    Its ranked as number 1

    Cheers
     
    lennart, Apr 25, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UmV4VmFu?=

    LoadControl() problem

    =?Utf-8?B?UmV4VmFu?=, Aug 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,274
    Stefan
    Aug 31, 2004
  2. Umut Tezduyar
    Replies:
    10
    Views:
    796
    Umut Tezduyar
    Nov 29, 2004
  3. =?Utf-8?B?U3VzaGlTZWFu?=

    LoadControl Compilation problem

    =?Utf-8?B?U3VzaGlTZWFu?=, Mar 6, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    381
    =?Utf-8?B?U3VzaGlTZWFu?=
    Mar 6, 2007
  4. Deane
    Replies:
    0
    Views:
    871
    Deane
    Sep 3, 2007
  5. J055

    User controls and LoadControl method

    J055, Oct 3, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    148
    Luke Zhang [MSFT]
    Oct 5, 2006
Loading...

Share This Page