Wednesday, February 10, 2010

ASP.NET AJAX this._form is null error on javascript

If ever you encounter this sneaky error on your ASP.NET AJAX-Enabled websites (you would know it when you see the this._form is null javascript error message or simply if your controls don't cause postbacks anymore) the culprit is the javascript declaration found on the head tag in the html page.

If you have declared it like this:

<script src="scripts/main.js" type="text/javascript" />

Simply change it to this:

<script src="scripts/main.js" type="text/javascript"></script>

And problem is solved.


1 comment: