How to pass large amount of data to a script that generates a dynamic image?

Discussion in 'ASP .Net' started by computer_guy, Jul 20, 2007.

  1. computer_guy

    computer_guy Guest

    Hi Everyone,

    I am writing an HTMP page like below:

    ---------------Dynamic HTML Page report.aspx-----------------------

    1. Complicated algorithm to generate data and store it in memory


    2. Inline Image to visualize generated data in graphic format.
    <img id="ss_img" src="Charting.ashx?data=<Large Block of Data
    Generated
    (~ 32 KB - 512KB) > />


    3. HTML table to visualize data generated in #1 in tabluar format.


    ----------------------End of HTML
    Page-----------------------------------

    My problem is that report.aspx has to pass a lot of data to
    charting.ashx, so much that it cannot be passed into Chart.apsx with
    HTTP GET. I don't think you can do HTTP POST on the <img> tag. I am
    thinking to store the data to a temp file and pass the file name in
    (<img src="Charting.ashx?tempfile=...">), but this is messy and it is
    a problem to clear temp files.


    Thanks a lot,
    computer_guy

    P.S. This is a refined version of a related message I posted yesterday
    on this group. Yesterday's message was way too unclear. I apologize if
    you have already read the previous message and was able to infer I
    meant the same thing.
    computer_guy, Jul 20, 2007
    #1
    1. Advertising

  2. Hi computer_guy

    > My problem is that report.aspx has to pass a lot of data to
    > charting.ashx, so much that it cannot be passed into Chart.apsx with
    > HTTP GET. I don't think you can do HTTP POST on the <img> tag. I am
    > thinking to store the data to a temp file and pass the file name in
    > (<img src="Charting.ashx?tempfile=...">), but this is messy and it is
    > a problem to clear temp files.

    where is the orgin of the data, that you`ll put on the querystring?
    the usually way is to put a ID on the querystring, and grabbing the data
    within
    the Handler.

    --
    Gruss, Peter Bucher
    Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
    http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
    http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
    Peter Bucher [MVP], Jul 20, 2007
    #2
    1. Advertising

  3. computer_guy

    computer_guy Guest

    On Jul 20, 9:29 am, "Peter Bucher [MVP]" <>
    wrote:
    > Hi computer_guy
    >
    > > My problem is that report.aspx has to pass a lot of data to
    > > charting.ashx, so much that it cannot be passed into Chart.apsx with
    > > HTTP GET. I don't think you can do HTTP POST on the <img> tag. I am
    > > thinking to store the data to a temp file and pass the file name in
    > > (<img src="Charting.ashx?tempfile=...">), but this is messy and it is
    > > a problem to clear temp files.

    >
    > where is the orgin of the data, that you`ll put on the querystring?
    > the usually way is to put a ID on the querystring, and grabbing the data
    > within
    > the Handler.
    >
    > --
    > Gruss, Peter Bucher
    > Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerlandhttp://www.aspnetzone.de/- ASP.NET Zone, die ASP.NET Communityhttp://www.aspnetzone.de/blogs/peterbucher/- Auf den Spuren von .NET


    Hi Peter,

    The data that I want to put on the querystring is dynamically
    generated by the host page. It is not stored anywhere. The host page
    report.aspx does the following in sequence:

    1. Generate data from some complicated algorithm
    2. Pass this generated data to chart.aspx to display it as an inline
    image.
    3. Show this same data in HTML tables.

    Thanks a lot,
    computer_guy
    computer_guy, Jul 20, 2007
    #3
  4. hi computer_guy

    > 1. Generate data from some complicated algorithm
    > 2. Pass this generated data to chart.aspx to display it as an inline
    > image.
    > 3. Show this same data in HTML tables.

    Okay, thats not an easy situation :)
    My approach would be, to give the HttpHandler two possible parameters.
    One of them for example called "htmldata" and the other "imagedata".

    The Handler gives by de passed parameter the htmldata for the grid,
    or the image data for the image back.

    i dont know whether you only can generate the data in your aspx site, or
    also in the Handler.
    Otherwise, i would save this data temporary on the physical disk.

    --
    Gruss, Peter Bucher
    Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland
    http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community
    http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
    Peter Bucher [MVP], Jul 20, 2007
    #4
  5. computer_guy

    computer_guy Guest

    On Jul 20, 12:46 pm, "Peter Bucher [MVP]" <>
    wrote:
    > hi computer_guy
    >
    > > 1. Generate data from some complicated algorithm
    > > 2. Pass this generated data to chart.aspx to display it as an inline
    > > image.
    > > 3. Show this same data in HTML tables.

    >
    > Okay, thats not an easy situation :)
    > My approach would be, to give the HttpHandler two possible parameters.
    > One of them for example called "htmldata" and the other "imagedata".
    >
    > The Handler gives by de passed parameter the htmldata for the grid,
    > or the image data for the image back.
    >
    > i dont know whether you only can generate the data in your aspx site, or
    > also in the Handler.
    > Otherwise, i would save this data temporary on the physical disk.
    >
    > --
    > Gruss, Peter Bucher
    > Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerlandhttp://www.aspnetzone.de/- ASP.NET Zone, die ASP.NET Communityhttp://www.aspnetzone.de/blogs/peterbucher/- Auf den Spuren von .NET


    I ended up using a good old temporary file to pass the data. Thanks
    for your help.
    computer_guy, Jul 21, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James
    Replies:
    29
    Views:
    2,165
    Dale King
    Apr 15, 2006
  2. Replies:
    0
    Views:
    424
  3. Replies:
    2
    Views:
    546
  4. dreamvigile

    how to read in large amount of data in C?

    dreamvigile, Jul 18, 2003, in forum: C Programming
    Replies:
    0
    Views:
    343
    dreamvigile
    Jul 18, 2003
  5. Manlio Perillo
    Replies:
    20
    Views:
    772
    Dennis Lee Bieber
    Nov 24, 2005
Loading...

Share This Page