BinaryImage url problem in MVC

Thread is closed for posting
2 posts, 0 answers
  1. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 03 Jul 2009 Link to this post

    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; 
    <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.

  2. Rosen
    Rosen avatar
    3247 posts

    Posted 08 Jul 2009 Link to this post

    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,
    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.
Back to Top