Asp.Net – “Sys.ArgumentNullException: Value cannot be null. Parameter name: elements” Error when using AjaxControlToolkit

Today I started experiencing a weird problem with AjaxControlToolkit Calendar Extender control – it would render at the top left corner of the page, and not under the text box control it was bound to.

Fired up Google Developer Tools and saw an error that was being thrown – Sys.ArgumentNullException: Value cannot be null. Parameter name: elements.

Adding ScriptMode=”Release” to asp:ToolkitScriptManager solved the issue. Not sure why release version of the script libraries would be different to debug version (or why debug version causes the problem), but this solved my problem.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s