ERROR - UNABLE TO LOAD CONTROL

Topics: Controls
Dec 27, 2007 at 6:12 AM
Edited Dec 27, 2007 at 6:14 AM
I'm getting this error applying the User Injection Control video tutorial to the new BE 1.3. Anyone else getting this? ERROR - UNABLE TO LOAD CONTROL : ~/test.ascx
Jan 30, 2008 at 10:26 AM
I have the same Problem and can´t find the solution!
Jan 30, 2008 at 1:59 PM
I use this feature all the time, and it works great. The error will appear, however, IF you do not refer to the user control exactly correctly.

Is your "test.ascx" in the root, or in a folder? If in the root, try moving it to a folder? (I keep mine in a folder...)
Do the names match exactly?


It does work- don't give up!
Jan 30, 2008 at 2:07 PM
As far as I know, User Controls have to be in the User Controls directory. I would check this first.

If they are there maybe my experience below will help.

I've been working on my own User Control in the last couple of days and I had this error a few times. This seemed to happen for me when there was an error either in the .ascx file or the .ascx.cs file.

If you have Visual Web Developer/Studio I suggest you create a blank website, add your files and try to compile. If there are any errors, these will be flagged. Once corrected, try uploading again to the user controls directory. You should find that this now works. If you are using parameters, try just embedded the User Control with no parameters to rule out any problems there.

Good Luck!

Paul.
Jan 31, 2008 at 6:34 AM
Edited Jan 31, 2008 at 6:35 AM

ptumelty wrote:
As far as I know, User Controls have to be in the User Controls directory. I would check this first.
...
I've been working on my own User Control in the last couple of days and I had this error a few times. This seemed to happen for me when there was an error either in the .ascx file or the .ascx.cs file.
...


I have a group of UC's in a folder I created called "Calculators" ... It looks to me that as long as you correctly specify it's location in the injection this much should work.

Good point about errors originating from the control itself. I develop my usercontrols in a test environment to make sure the control works as expected before putting on the blog.
Jan 31, 2008 at 7:39 AM
Thanks a lot for your answers!

I´ve found the Problem inside my User control. I developed the control in an ASP.Net 3.5 Environment, the Control works correctly there, but in my .net 2.0 BlogEngine-Web generate the "using System.Xml.Linq;" - namespace in the control an Error.

I tried to put the *.ascx- and the *.cs-File in the root-Directory or in an Folder, both works fine!

Thanks again,

Marcel