Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Help with custom tables View modes: 
User avatar
Member
Member
maaizle-yahoo - 4/27/2011 6:04:53 AM
   
Help with custom tables
Hi, I am a junior developer fresh from school and am kinda new to the Kentico CMS. I have created a custom table with a field for uploading files. The files could be anything from images to pdf's. What I want to do is to fetch the path to the uploaded files and use them in an anchor tag in an asp repeater so when the user clicks on the link they can download it. Any Ideas?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 4/27/2011 8:28:37 AM
   
RE:Help with custom tables
Hello,

The easiest approach would be to use an url in the following format:

www.domain.com/getattachment/guid/filename.ext

The transformation should look the following way:

<a href="www.domain.com/getattachment/<%# Eval("customField")%>/fileName.ext" >
<%# Eval("DocumentName") %>
</a>

Some useful information can be found also in this forum thread and our documentation.

Best regards,
Boris Pocatko