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

BinaryImage url problem in MVC

1 Answer 85 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
robertw102
Top achievements
Rank 1
robertw102 asked on 03 Jul 2009, 07:58 PM
I just started using the BinaryImage control in my MVC application, but it doesn't seem to be working correctly.

The code I'm using is this:
<
imgMain.DataValue = images[0].ImageFile; 
imgMain.DataBind(); 
%> 
<telerik:RadBinaryImage ID="imgMain" runat="server" Width="720px" Height="470px" 
                AutoAdjustImageControlSize="false" /> 

The "ImageFile" property's db type is "VarBinary(MAX)", but I retrieve it as a Byte[] array in my LINQ class. The problem I'm seeing is that the image isn't showing up. The tag is generated with the url, but nothing is showing. I have the Telerik resource file registered in my web.config, which was generated by the RadScriptManager control, so it must exist.

If you could tell me what I'm doing wrong or how I can fix it, it would be much appreciated.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 08 Jul 2009, 02:17 PM
Hello Robert,

I suspect that the behavior you are experiencing is due to the fact that the code block in which you are populating the control is executed on render, however the RadBinaryImage data processing is done in prerender stage of its lifecycle, thus the control is not populated yet.  I'm happy to inform you that our developers has managed to address this limitation and the fix will be available for you to try with the next internal build. Meanwhile I have updated your telerik points for bringing this to our attention.

All the best,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
robertw102
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or