Disable Event Validation in SharePoint
28. November 2007 08:54

So you developed a slick MOSS webpart, but you do some fancy AJAX and the ASP.Net event validation system is throwing exceptions for you?

Sometimes it isn't practical/possible to register all your values for event validation with the clientscriptmanager, and you just need to disable the feature.

Open up your sharepoint web.config, and search for  "<Page"

Add a new attribute to the tag, enableEventValidation="false"

It should now look something like this:

    <pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7" enableEventValidation="false">
Save your web.config, and your good to go.
Tags: Comments (0) | Permalink

Comments

Comments are closed