Monday, March 19, 2007

AJAX Control Toolkit (release 10301) note*

Monday, March 19, 2007 2:00:29 PM (GMT Standard Time, UTC+00:00)

Issue to lookout for...

This weekend I recognised that a new release of the AJAX Control Toolkit (release 10301) was available so with the idea of "possibly more stable controls", I rushed to get it. As I dropped the DLL in one of the projects, I immediately was hit with the following error:

"Object reference not set to an instance of an object."

The stack trace went something like this..:

[NullReferenceException: Object reference not set to an instance of an object.]
AjaxControlToolkit.ScriptObjectBuilder.RegisterCssReferences(Control control) +316
AjaxControlToolkit.ScriptControlBase.OnPreRender(EventArgs e) +222
System.Web.UI.Control.PreRenderRecursiveInternal() +77

Fearing that there was something else I needed to implement or add, quickly I checked the SampleWebSite and browsed the AJAX forum for information.. That.. was largely unsuccessful.. so I turned to search engines and within about 10 minutes I located the problem..

It seems that unlike with the 10201 release, the HEAD tag of the website must contain a runat="server".. And once I added that, the site worked just like before! (Or well.. from what I've seen thus far anyway.. ;))

If you're interested in the post I found online that gave me the solution to this exception refer to the "Bug in the latest build of the Toolkit TabContainer?" thread.

Comments are closed.