none
HttpHandler - Image address or url RRS feed

  • Question

  • How do i get the location of the image created using HttpHandler?

    I know its a temporary, or cache, saved file but is there a way to extracting the location of that image for use inside a webpart?

    for use with a ChartPart webpart.  i am trying to create a Chart that is wholy clickable not just a data-mapset of the control.

    The Chart, from MSCharts is being setup as such:

    //this is in the CreateChildControls of the WebPart class
    
    m_chart.Page = this.Page;
    m_chart.ImageType = ChartImageType.Png;
    m_chart.ImageStorageMode = ImageStorageMode.UseHttpHandler;
    m_chart.RenderType = RenderType.ImageTag;
    
    


     


    "I am the reason, Curiosity killed the Cat!" Please be patient, there are times where i do not respond for weeks at a time. Developer Fusion Tool
    Tuesday, January 3, 2012 5:39 PM

Answers

All replies

  • Hi goldbishop,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.


    Daniel Yang

    TechNet Community Support

    Monday, January 9, 2012 10:51 AM
    Moderator
  • Its kewl....i just havent done alot of work utilizing an HTTPHandler, so not sure if i can use it to reference the Chart as an image or not. 

    HTTPHandler is being used to cache the chart but not sure if i can use the same handler to reference the image path for linking an image.


    "I am the reason, Curiosity killed the Cat!" Please be patient, there are times where i do not respond for weeks at a time. Developer Fusion Tool
    Monday, January 9, 2012 12:09 PM
  • The following links might help.

    http://blogs.msdn.com/b/deliant/archive/2008/12/02/managing-chart-generated-images-with-chart-image-handler.aspx

    http://www.4guysfromrolla.com/articles/081909-1.aspx

    If the images are stored somewhere on your C: drive as per above articles, then you can just link them in your webpart Or you can store chart images in a document library and use them in your webpart.

    Monday, January 9, 2012 7:03 PM
  • Hi Manish Joshi,

    can you please elaborate how to save the chart images in a document library, actually I am having the same requirement in my scenario but in browser getting the following error:

    `Message: Sys.WebForms.PageRequestManagerServerErrorException: 'http://sp2010/Chart/Chart_000001.png' is not a valid virtual path.`

    when I am trying to use the below code :

    `chart.ImageLocation = "http://sp2010/Chart/Chart_#SEQ(50,5)";

    chart.ImageStorageMode = ImageStorageMode.UseImageLocation; `


    Answer to your Question on technet.

    Wednesday, June 20, 2012 2:30 PM