.Net & SharePoint '07

Technical blog for .Net and all SharePoint 2007 related Information

About the author

Me(Prince) and my wife are B.E in I.T & C.S.E respectively.  I a certified MCPD: Web from 2007 Dec. I am Intrestes in Web Application, MOSS, EPM, etc.
Now working with Deira International School, as IT Application & Help Manager. I have started my career as "Software Developer" @  REACH Sewn Technologies and Consulting Pvt. Ltd, Bangalore India from Oct 2004 to Feb 2006, then as "Web & Intranet Developer" @ Fosroc International Ltd, Dubai from April 2006 to Sep 2009.
You can catch me on mail@jpy-tech.com or mail@princepy.com. Or on 00971 - 50 - 4284530 

Google Translate

Tag cloud

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

RecentComments

Comment RSS

Google Your Location


Error message when you click "New" to create a new item in a list or when you click an existing item in SharePoint Server 2007 or in Windows SharePoint Services 3.0: "Invalid page URL" or "An unexpected error has occurred

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 !!!)

  1. Open NewForm.aspx and EditForm.aspx in Sharepoint Designer
  2. 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>
  3. 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>
  4. 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".
  5. 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}" >
  6. 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>
  1. 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:

  1. Start SharePoint Designer 2007, and then open the NewForm.aspx page for the list.
  2. Right-click the List Form Web Part, and then click Web Part Properties.
  3. Expand Layout, click to select the Hidden check box, and then click OK.

Posted by admin on Tuesday, February 03, 2009 12:39 PM
Permalink | Comments (3) | Post RSSRSS comment feed