Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Customizing EditForm.aspx fails after removing ListFormWebPart

  Asked By: Paul    Date: Feb 10    Category: MOSS    Views: 5471

I would like to replace the ListFormWebPart with my own webpart in
a customized EditForm.aspx for a list called "TodoList".

Before any customization in EditForm.aspx the Edit form icon provides
a link like this for example:
sharepoint2007:100/.../EditForm.aspx?ID=77


My first step is to remove the existing ListFormWebPart webpart from
EditForm.aspx using SharePoint Designer.
I save the new EditForm.aspx, now with no webpart, and perform iisreset.

Now the Edit form icon provides a link like this:
http://sharepoint2007:100/?ID=77

Can someone explain why the link no longer contains the
/Lists/TodoList/EditForm.aspx part, please?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Karrie Wooten     Answered On: Feb 10

Yeah, that's happened to me before, too. It would be nice to know
how to fix it.

Ever since this happened to me, when I need to customize DispForm,
EditForm, etc, I always just copy them and modify the COPY. Then, once
you have the copy looking like you want it, you can go into the list's
properties in SP Designer and point it so that the new EditForm is the
default. That way, you're never messing with the original file.

 
Answer #2    Answered By: Alan West     Answered On: Feb 10

When you remove  the ListFormWebPart from the web part  page you should substitute
a DataFormWebPart in its place using the Insert->SharePoint Controls->Custom
List Form menu entry in SharePoint Designer. This will add a DataFormWebPart on
the page and retain the appropriate parameter passing to the page.

 
Answer #3    Answered By: Maribel Todd     Answered On: Feb 10

I tried to substitute the ListFormWebPart with a
DataFormWebPart in the original EditForm.aspx, but the result was once
again a failing link  like http://sharepoint2007:100/?ID=77 for the
Edit icon.

Is there any way I can modify my EditForm.aspx (below) to retain the
appropriate parameters passed to the page so the Edit icon  link works
sharepoint2007:100/.../EditForm.aspx?ID=77

I'm not sure where the parameter passing goes wrong, please.


<%@ Page language="C#" MasterPageFile="~masterurl/default.master"
Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Ver\
sion=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
meta:progid="SharePoint.WebPartPage.Document"
meta:webpartpageexpansion="full" %>
<%@ Register tagprefix="My_EditForm" namespace="My_EditForm"
assembly="My_EditForm, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=110a43d643dc684d" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
<SharePoint:ListFormPageTitle runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea"
runat="server">
<SharePoint:ListProperty Property="LinkTitle" runat="server"
id="ID_LinkTitle"/>
:
<SharePoint:ListItemProperty id="ID_ItemProperty" MaxLength=40
runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server">
<IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt="">
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"/>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<table cellpadding=0 cellspacing=0 id="onetIDListForm">
<tr>
<td>
<WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main"
Title="loc:Main"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
<My_EditForm:EditFormClass runat="server" ID="EditFormClass1"
Title="EditFormClass" __MarkupType="vsattributemarkup"
__WebPartId="{1385416f-4d3a-46b3-857e-5f9b27142575}" WebPart="true"
__designer:IsClosed="false"></My_EditForm:EditFormClass>
<IMG SRC="/_layouts/images/blank.gif" width=590 height=1 alt="">
</td>
</tr>
</table>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderTitleLeftBorder"
runat="server">
<table cellpadding=0 height=100% width=100% cellspacing=0>
<tr><td class="ms-areaseparatorleft"><IMG
SRC="/_layouts/images/blank.gif" width=1 height=1 alt=""></td></tr>
</table>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaClass"
runat="server">
<script id="onetidPageTitleAreaFrameScript">

document.getElementById("onetidPageTitleAreaFrame").className="ms-areaseparator"\
;
</script>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderBodyAreaClass"
runat="server">
<style type="text/css">
.ms-bodyareaframe {
padding: 8px;
border: none;
}
</style>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderBodyLeftBorder"
runat="server">
<div class='ms-areaseparatorleft'><IMG
SRC="/_layouts/images/blank.gif" width=8 height=100% alt=""></div>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderTitleRightMargin"
runat="server">
<div class='ms-areaseparatorright'><IMG
SRC="/_layouts/images/blank.gif" width=8 height=100% alt=""></div>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderBodyRightMargin"
runat="server">
<div class='ms-areaseparatorright'><IMG
SRC="/_layouts/images/blank.gif" width=8 height=100% alt=""></div>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaSeparator"
runat="server"/>