SYMPTOMS
Consider the following scenario. You use Microsoft Office SharePoint Designer 2007 to customize the NewForm.aspx page of a list in a Microsoft Office SharePoint Server 2007 site or in a Microsoft Windows SharePoint Services 3.0 site. Then, you connect to the list by using a Web browser. In this scenario, you experience the following symptoms:
If you click New to create a new item in the list, you receive the following message:
Invalid page URL:
If you click an existing item in the list, you receive the following error message:
An unexpected error has occurred
Additionally, you might view the properties of the list in SharePoint Designer 2007 and then specify the NewForm.aspx page in the New item form box. When you do this, the NewForm.aspx page appears to be saved as the new item form when you click OK. However, the next time that you view the properties of the list, the New item form box is empty.
Back to the top
CAUSE
This issue occurs if you deleted the List Form Web Part from the NewForm.aspx pa...This issue occurs if you deleted the List Form Web Part from the NewForm.aspx page.
Back to the top
RESOLUTION
Method 1:
To resolve this issue, delete the list, and then re-create it. Then, customize t...To resolve this issue, delete the list, and then re-create it. Then, customize the NewForm.aspx page. When you customize the NewForm.aspx page, make sure that you do not delete the List Form Web Part.
Back to the top
Method 2:
(Many thanks to myang and AngelIndaux !!!)
- Open NewForm.aspx and EditForm.aspx in Sharepoint Designer
- Copy the code for the ListFormWebPart control from the EditForm.aspx. The code in question reaches from
<WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{YOUR_GUID}" >
down to
</WebPartPages:ListFormWebPart>
- Paste it into the broken NewForm.aspx, I pasted it right below the Line:
<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main"><ZoneTemplate>
- Within the pasted lines of code look up the lines starting with
<ControlMode
and
<FormType
In the "Control mode" tag replace the "Edit" with "New", in the "FormType"-Section replace the digit "6" with "8".
- Before saving, you have to generate a new GUID for the pasted control in your NewForm.aspx otherwise your EditForm.aspx will be broken after saving!!!
There are online GUID generators on the internet so you don't need Visual Studio, e. g.: http://www.somacon.com/p113.php
Generate a new GUID and asign it to the "__WebPartId" attribute in the very first line of code of your control:
<WebPartPages:ListFormWebPart runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{YOUR_NEW_GUID_HERE}" >
- Look up the <ID></ID>-Tag further below (it was about 27 lines below in my case) and change a random number in the ID, e. g.
Before: <ID>g_f01e99f1_7bcf_4f33_aa97_4b7b471903f4</ID>

After: <ID>g_19C00971-00EB-4100-856E-CFF701F31723</ID>

- Save your work...and your done!
MORE INFORMATION
If you want to customize the controls that appear on the NewForm.aspx page, and...If you want to customize the controls that appear on the NewForm.aspx page, and if you do not want to show the default List Form Web Part, you can hide the List Form Web Part. To do this, follow these steps:
- Start SharePoint Designer 2007, and then open the NewForm.aspx page for the list.
- Right-click the List Form Web Part, and then click Web Part Properties.
- Expand Layout, click to select the Hidden check box, and then click OK.