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

C

computer_guy

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

Peter Bucher [MVP]

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

computer_guy

Hi computer_guy


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.

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
 
P

Peter Bucher [MVP]

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

computer_guy

hi computer_guy


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.

I ended up using a good old temporary file to pass the data. Thanks
for your help.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top