I have a custom edit form - a ".aspx" page - which I want to make changes to. Since the existing one is being used, we make a copy of that one and edit it off to the side, until it has been verified.
MyPage.aspx > copy to MyPageA.aspx
Once I make the copy, I can go to MyPageA.aspx without a problem. But if I simply edit in advanced mode, do NOTHING, save and check in, now I get the following error:
Only Content controls are allowed directly in a content page that contains Content controls.
headers include reference to the master page file
<%@ Page Language="C#" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=188.8.131.52, Culture=neutral, PublicKeyToken=71e9bce111e9429c" masterpagefile="~masterurl/default.master" title="|" meta:progid="SharePoint.WebPartPage.Document" %>
and the content sections something like this:
<asp:Content id="Content1" runat="Server" contentplaceholderid="PlaceHolderMain"> ... </asp:Content> <asp:Content id="Content2" runat="server" contentplaceholderid="PlaceHolderAdditionalPageHead"> ... </asp:Content> <WebPartPages:WebPartZone runat="server" ID="__WebPartPageLibraryZone__"><ZoneTemplate> ... </WebPartPage:WebPartZone>
So right away, that error suggests not to leave stuff outside the asp:Content tags. Ok. I notice the "webpartzone" stuff is outside the asp:Content tags at the end of the page. But then again, it works on the original just fine, and still works with a copy. Its only once "Edit in Advanced Mode" opens and saves it that stuff is screwed up.
My question - does Sharepoint somehow change the type of page it sees once I edit/save in advanced mode, even if I don't do any changes? It's as if the type of page changes.
I found I can open in Notepad and sometimes do some edits, but that seems to have other unintended changes.
Thanks in advance for your feedback.