Pages

Tuesday, January 24, 2017

“The attribute 'autoeventwireup' is not allowed in this page” issue in SharePoint 2013

Problem

Recently we deployed two wsp solutions in an environment. One wsp consists of master page and the other one consists of a site page with code behind where I use events like onclick and all.

After the deployment when I try to access the aspx page we got the above error.

Solutions

Solution 1.

Remove the code behind file and create a web part and add the web part in the page.You can see my blog post on how to create site page without code behind.

Solution 2.

Go to Site Settings page, under the Site Action section, click Reset to site definition.

01

Then give your page url and click Reset.

Capture

Check your page.

If its still the same give your master page url (which ends with .master) and repeat the above step.

Now your page should work fine.

No comments:

Post a Comment