I have seen this error on various forums for quite sometime and wondered what is that SharePoint is doing around this?
It usually happens when you add Asyc="True" attribute to a SharePoint page and try to run the page, you get Parser error "The async attribute on the page directive is not allowed in this page."
Upon further debugging and researching, found that SharePoint’s SPPageParserFilter class blocks some page directive attributes. Checked the details of the SPPageParserFilter and found that the following are the only Page attributes which allowed by SharePoint Page Parser. If you use any other attribute which is not in the list given below, SharePoint will throw exception that "The 'xxx' attribute on the page directive is not allowed in this page."
Update: The highlighted 3 new entries were found in the Microsoft.SharePoint.dll for build number 12.0.6504.5000, bring the total count to 31.
As always… Happy Coding
PingBack from http://microsoft-sharepoint.simplynetdev.com/parser-error-%e2%80%9cthe-async-attribute-on-the-page-directive-is-not-allowed-in-this-page%e2%80%9d/
I'm getting the same error. Any solution you get to resolve this error?
Anuja, this list of allowed directives is hard coded inside SharePoint and these are the only allowed directives.
If you use any other directive, which is not part of the list given, SharePoint will throw the error message.
I'm getting this error on "maintainscrollpositiononpostback".