Third party ascx control integration: The type or namespace could not be found

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/21/2010 8:09:06 AM
Gravatar
Total Posts 2

Third party ascx control integration: The type or namespace could not be found

I am adding a third party ascx control refrencing a Linq to SQL Context (same namespace as the control);

I have stong named the web app's DLL and got a Public key token, And have added the refrence to the web config.

but when navigating to the page that I have added the control to I am still getting:

System.Web.HttpCompileException: ...\Modules\CountyProjects.ascx.cs(60): error CS0246: The type or namespace name 'TestDataContext' could not be found (are you missing a using directive or an assembly reference?)
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at System.Web.UI.TemplateControl.LoadControl(String virtualPath)
at mojoPortal.Web.UI.CmsPage.LoadPage()
at mojoPortal.Web.UI.CmsPage.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at mojoPortal.Web.mojoBasePage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Any Ideas? I am out of them.
 

 

5/21/2010 8:36:29 AM
Gravatar
Total Posts 2

Re: Third party ascx control integration: The type or namespace could not be found

I had a refrence to:

Codebehind="MapDataCapture.ascx.cs" %>

in my .ascx  top tag:

<%@ Control

So it made me upload the .cs file ... this caused the code to complile for that page in a different namespace that couldn't find my uploaded dll.

Now I am fighting security issues with Linq To SQL in the hosting enviroment...

You must sign in to post in the forums. This thread is closed to new posts.