LoadControl problem - External Controls

Joined
Apr 24, 2010
Messages
2
Reaction score
0
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
 
Joined
Apr 24, 2010
Messages
2
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top