RSS

Category Archives: Dataview

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


Cause:

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.

Solution:

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 : http://support.microsoft.com/kb/972225

Advertisements
 
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”/>

OR

<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”/>

 </xsl:attribute>

</xsl:element>

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

 
2 Comments

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

 

Tags: ,