.getJSON Error
Posted: 08/06/2012 Filed under: JavaScript | Tags: Ajax, Error, jQuery Leave a comment »If you get a ‘context’ is null or not an object error, have a look at the JavaScript files that you are referencing on the page. It is known that the problem lies with the vsdoc file. Remove that reference from the page and only use your jQuery file and all will be fine again.
Script Controls may not be registered before Pre Render
Posted: 22/07/2011 Filed under: Uncategorized | Tags: Ajax Leave a comment »I got the following error (see below) after deploying and Ajax based web part to a SharePoint 2007 (yikes!) server.
I had manually made the required web.config entries earlier, and the web part by itself does not really do anything funky. It consisted of a ScriptManager, an UpdatePanel and a ProgressPanel. Looking around I realised that there was no problem with it prior to OnPreRender.
Following this forum thread I got to resolve the issue. Essentially, make sure the EnsureChildControls() is called on OnInit(), as below:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
EnsureChildControls();
}