Hi Conor,
The method accepts a guid (global unique identifier) as the parameter, not the attachment id. It is a property of the AttachmentInfo class
However, It looks like you're using a transformation, so I'm wondering if you're using a attachments datasource?
In this case, you don't even need the custom method. You can simply get these values directly from the datasource, as they are stored in the CMS_Attachment table directly.
For example:
<div>
<h3><%# Eval("AttachmentName")%></h3>
<p>Extension: <%# Eval("AttachmentExtension")%></p>
<p>Size: <%#Eval("AttachmentSize")%> Bytes</p>
</div>
Just make sure that these columns are included if you're filtering columns in the datasource.