I've got a single item DVWP (in a web part zone) displaying items from a list (gets the ID of the item to display from a query string parameter), it also displays any attachments using this;
<xsl:element name="SharePoint:AttachmentsField">
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:attribute name="ListId">{C0FB9150-7B78-4831-9098-8CE6CD7D31F3}</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>
We have the problem that when the page the DVWP is in draft, it displays the correct attachments for all items.
When the page is published it will display the correct attachments for the first item you view, then go on to show those same attachments for all other items. It will 'reset' itself when recycle the app pool.
Any help would be appreciated.
Thanks,
Dan.