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

Can not load image from database to BinaryImageControl using ToolTipManager

1 Answer 66 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Sree
Top achievements
Rank 1
Sree asked on 22 Jul 2009, 05:16 AM
Hello.
        I am  using a RadToolTipManager for displaying the full size image of thumb nail image in my form.It is not working when I am loading the image from the database using a binary image control.But it is working perfectly when I am loading image from a folder.
The web service  code I have used  is given below
 public string GetFullSizeImage(object context)
    {
        cApplicationSettings oAppSettings = new cApplicationSettings();  
        Telerik.Web.UI.RadBinaryImage img = new RadBinaryImage();   
        img.DataValue = (byte[])oAppSettings.GetDefaultPhoto(1).Rows[0][0];//This function will return the image from my table

        StringWriter sw = new StringWriter();
        HtmlTextWriter writer = new HtmlTextWriter(sw);     
        img.RenderControl(writer);
        writer.Flush();
        return sw.ToString();                 
    }
When I replace the DataValue field of the binary image with ImageUrl as below it is working without any problem.
  img.ImageUrl = "~/images/noimage.png";

1 Answer, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 27 Jul 2009, 10:45 AM
Hello sree,

I prepared for you a sample demo which shows how to render a RadBinaryImage inside a RadToolTipManager's tooltip with content loaded through a WebService as you describe your scenario.

I hope the attached demo will help you get the desired result.

Sincerely yours,
Svetlina
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
ToolTip
Asked by
Sree
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or