This is a migrated thread and some comments may be shown as answers.

Not Showing Image in ItemTemplate

1 Answer 54 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 10 Jul 2010, 06:33 PM

 

 

I am using the RadUpload (Upload) to upload images to a Database, as I select the images the file name is return in <%#DataBinder.Eval(Container.DataItem, "FileName")%> and since I am uploading multiple images, I thought it would be a good I idea to display them before summitting them. my problem is I am not picking up the filename in RadBinaryImage.

 

 

 

<

 

 

asp:Repeater ID="repeaterResults" runat="server" Visible="False">

 

 

 

<HeaderTemplate>

 

 

 

<div class="title">Uploaded files in the target folder:</div>

 

 

 

</HeaderTemplate>

 

 

 

<ItemTemplate>

 

 

 

<telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" ImageUrl='<%# Eval("FileName"))%>'

 

 

 

AutoAdjustImageControlSize="false" Height="56px" />

 

 

 

 

</ItemTemplate>

 

 

 

<ItemTemplate>

 

<%

 

#DataBinder.Eval(Container.DataItem, "FileName")%>

 

<%

 

#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>

 

 

 

<br />

 

 

 

</ItemTemplate>

 

 

 

</asp:Repeater>

 

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 14 Jul 2010, 12:48 PM
Hello Dennis,

You cannot display images before uploading them somewhere on the server in a public folder where the image can be referenced by its name. In your case, standard RadUpload cannot be used to show the selected images before uploading them.

A similar scenario in terms of user interaction is demonstrated in the RadAsyncUpload with Ajax Processing live demo. Note that we are using RadAsyncUpload to first upload the images to a temporary folder and then provide the data to RadBinaryImage to show a thumnbnail.

Regards,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
BinaryImage
Asked by
Dennis
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or