AJAX Errors: <Namespace> is undefined

One of the errors that frustrated me when developing AJAX controls was when I got <Namespace> is undefined, even though the script appeared to be correct.  I couldn't figure it out right away because the class was registered correctly and the namespace was defined properly as well.  So what could be the issue?

To help make AJAX development easier, I use a CodeSmith script to generate the shell AJAX component code, which works really well.  This time when I got the error, it was for a component I created manually without the script.  As soon as I replaced my code with the CodeSmith template generation code, the component began to work.

What this means is that while sometimes the error may be a missing component reference (like the System.Web.Extensions assembly or the AJAX Control TOolkit dll), more often the issue could be an issue with the formatting of your script, like a missing comma or curly brace, something like that.  Something small that even VS wasn't picking up with its limited error checking.

So, a word of caution: write your script, and check it twice Big Smile

Published Wednesday, August 20, 2008 4:44 PM by bmains
Filed under:

Comments

No Comments