Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > LoadControl problem - External Controls

Thread Tools

LoadControl problem - External Controls

lennart lennart is offline
Junior Member
Join Date: Apr 2010
Posts: 2

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.

Reply With Quote
lennart lennart is offline
Junior Member
Join Date: Apr 2010
Posts: 2

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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing and rendering user controls via LoadControl and RenderControl Deane ASP .Net Building Controls 0 09-03-2007 08:47 PM
User controls and LoadControl method J055 ASP .Net Web Controls 1 10-05-2006 07:10 AM
Controls failing when using LoadControl David R ASP .Net 1 01-04-2006 11:34 AM
Is LoadControl (virtualPath) is caching controls in a single request. If so, can i disable it. Umut Tezduyar ASP .Net 10 11-29-2004 07:10 AM
LoadControl() problem =?Utf-8?B?UmV4VmFu?= ASP .Net 1 08-31-2004 05:25 AM