Category Archives: Dataview

No item exists at http://SERVER/SITE/mypage.aspx?ID=1. It may have been deleted or renamed by another user


When we try passing the Query Parameter Name as ID to the .aspx Page (which itself is the record in the document library) Sharepoint loses track of what ID is used for. Sharepoint no longer knows if ID is the document in the document library or the ID of the listItem which we need to update using this .aspx page. This problem happens because Sharepoint has its own variable named ID which it uses to identify documents/pages on the server. Our solution should not be using a variable named ID.


Change the query string parameter from ID to CustomID. Then change the details page from QueryString(ID) to QueryString(CustomID). Once this is done the page will display with no errors.

Source :

1 Comment

Posted by on November 11, 2010 in Dataview, Sharepoint Designer


Display attachments in sharepoint dataview webpart using sharepoint designer

Use below code to show attachments in sharepoint dataview webpart .

Use this for Single List Item View:

<SharePoint:AttachmentsField ControlMode=”Display” ItemId=”{@ID}” EnableViewState=”true” FieldName=”Attachments”  runat=”server”/>

Use this for Multiple List item Vew:

<SharePoint:AttachmentButton ControlMode=”Edit” Enabled=”true” ItemId=”{@ID}” runat=”server” Visible=”false”/><SharePoint:AttachmentsField ControlMode=”Display” ItemId=”{@ID}” EnableViewState=”true” FieldName=”Attachments” runat=”server”/>


<xsl:element name=”SharePoint:AttachmentsField”>

 <xsl:attribute name=”runat”>server</xsl:attribute>

 <xsl:attribute name=”FieldName”>Attachments</xsl:attribute>

 <xsl:attribute name=”ControlMode”>Display</xsl:attribute>

 <xsl:attribute name=”Visible”>true</xsl:attribute>

 <xsl:attribute name=”ItemId”>

  <xsl:value-of select=”@ID”/>



NOTE: Please verify double quotes once you copied to sharepoint designer


Posted by on August 23, 2009 in Code Snippets, Dataview, Sharepoint Designer


Tags: ,