Oct
9
Written by:
Alan
2009-10-09 03:06:41Z
I was working on a .NET 2.0 Web Application, and had attempted to add a ScriptManager control to a Master page from the Toolbox, from the ASP.NET AJAX Extensions (1.6.0something). Visual Studio 2005 refused to do it, giving me this error message in a dialog box:
Control cannot be created because Visual Studio cannot find the control's type in the control's assembly
I Binged that error message, and found something that was close: Rick Strahl had an error in his web.config file. However, I did not have an error in my web.config file.
What I did have, however, was a <system.web>/<compilation> section that used the configSource attribute to use a separate .config file for that section. I find it helpful to have a separate .config file for almost every section in system.web. Unfortunately, Visual Studio doesn't care for me doing that. Once I brought all the child elements of the compilation element back into the web.config file, I could easily add the ScriptManager to my Master page. I'm not sure why -- I had already manually added the assembly to the <compilation> section, so VS didn't need to add it again, nor why the error message is as cryptic as it is considering the root cause.
Tags: