Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > File Selection Form control transformation View modes: 
User avatar
Member
Member
esolutions - 6/12/2013 12:02:46 AM
   
File Selection Form control transformation
Hi,
The File selection form control is being used to upload images. I'm struggling with getting the image to display with the transformation. I've tried <img src="<%# GetDocumentUrl("SectionImage") %>" width="100%"/> which yields <img src="" width="100%"/>.
<img src="<%# GetFileUrl("SectionImage") %>" width="100%"/> which has yielded <img src="/getattachment/00000000-0000-0000-0000-000000000000/sectionImg1.aspx" width="100%"/>. Any ideas?

User avatar
Kentico Support
Kentico Support
kentico_romank - 6/12/2013 12:22:47 AM
   
RE:File Selection Form control transformation
Hi,

Could you please try to use this:
<img src="~/CMSPages/GetFile.aspx?nodeguid=<%# Eval("SectionImage") %>" />

Does it make to display image correctly?

Best Regards,
Roman Konicek

User avatar
Member
Member
esolutions - 6/12/2013 9:01:47 AM
   
RE:File Selection Form control transformation
Hi,
I added the above and viewed the source: it yielded <img src="/CMSPages/GetFile.aspx?nodeguid="

User avatar
Kentico Support
Kentico Support
kentico_romank - 6/24/2013 6:01:24 AM
   
RE:File Selection Form control transformation
Hi,

So, that means you are not able to see any image at all, right? Could you please try to use this code, to see if that helps:

<img src="<%# GetDocumentUrl("YourColumn", "") %>" />

Best Regards,
Roman Konicek


User avatar
Member
Member
esolutions - 6/24/2013 8:45:30 AM
   
RE:File Selection Form control transformation
I ended up changing it from a "file selection" control to an "image selection" control to get it to work.