Hi there,

im having an issue dynamically loading a webusercontrol.

In my vs2008 solution i have several projects. their is the main web project, then several other projects that are controls to be used in the main project.

In the main web application when a user requests a page it will dynamically load a WebUserControl in on of these other projects, based on a supplied Id in the querystring.

I publish each project that has a webusercontrol to a directory called controls under the main project.
ie:
c:\inetpub\wwwroot\MyWebProject
c:\inetpub\wwwroot\MyWebProject\Controls

so when i try and load a web control to my default aspx page i do the following

Dim defaultCtrl As Control = LoadControl("~/Controls/DefaultWebControl/newPage.ascx")
me.Controls.Add(defaultCtrl)

however i keep gettin an exception saying "Could not load type XXXXXX"
and the exception is of httpparser.

this is very frustrating, i cant see why this doesnt load.
if i try load the webusercontrol into a aspx page in the same project it will load. But it will not load for my main project..

Thanks for any help