Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a custom list with a custom newform. Using all OOTB SharePoint masterpages it works great. I now roll it to our test farm and it errors with a custom masterpage. The error is

The attribute 'autoeventwireup' is not allowed in this page

I've reviewed the custom master page and it actually isn't very custom. It's only custom to include a style sheet and some jquery files. As part of testing I copied the entire contents from v4.master and inserted it into the custom masterpage and it still errors.

If I remove autoeventwireup from my custom page I start getting other errors about page_load, etc. However, i don't want to remove it since it works OOTB.

Any ideas?

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Resolved! Code behind doesn't appear to be allowed on the newform page. As it stands I was using a user control in the new form. So I removed the autoeventwireup and the code behind file from my newform and that worked.

share|improve this answer
    
That is strange! I have created several custom forms in 2007 with user controls that have code behind and they work great. If your user control has code it should work. Though the autoeventwireup is not required! –  spevilgenius Nov 2 '11 at 14:55
    
yeah, it worked if my user control has code behind, but my actual page (which calls the user control) had a code behind, empty, so I removed it and it worked great. –  David Lozzi Nov 2 '11 at 17:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.