new SPAttachmentCollection is getting red what the problem? Want to display an attachment in Repeater
<%# (new SPAttachmentCollection(((SPListItem)Container.DataItem)["Attachments"].ToString()).UrlPrefix) %>
Morski,
Instead can you try the following:
<%# (((SPListItem)Container.DataItem).Attachments.UrlPrefix) %>
UrlPrefix property will give you only the Url Prefix part for the Attachments, you need to append the attachment file name to make complete Attachment Url...
Please follow below link:
How do I get the url for attachments on an SPListItem using C#?