.NET 2.0, Sitecore 5.2, Client Side validation and web.config

Some information about .NET 2.0 and client side validation.

As opposed to .NET 1.1, .NET 2.0 does not rely on ready-made .js files in the aspnet_client folder in order to make client side validation.

Instead the files is made run-time. .NET 2.0 does this by adding a reference to a webresource.axd file in the root of the web site.
The .js is generated by this axd so that it matches the browser and the controls on the page. The reference can look like this:


In order for this to work with Sitecore 5.2, you must add the WebResource.axd to the IgnoreUrlPrefixes in the web.config:

setting name=”IgnoreUrlPrefixes”

The setting should be set by Sitecore as standard, but it is not yet so. So until that happens, remember to set it yourself, or you will get an “WebForm_PostBackOptions is undefined” error on pages using validators.

About briancaos

Developer at Pentia A/S since 2003. Have developed Web Applications using Sitecore Since Sitecore 4.1.
This entry was posted in Sitecore 5 and tagged , , , . Bookmark the permalink.

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