Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
computer_guy - 20 Jul 2007 15:10 GMT
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.
Peter Bucher [MVP] - 20 Jul 2007 15:29 GMT
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.

Signature

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

computer_guy - 20 Jul 2007 16:37 GMT
> Hi computer_guy
>
[quoted text clipped - 13 lines]
> 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
Peter Bucher [MVP] - 20 Jul 2007 18:46 GMT
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.

Signature

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

computer_guy - 21 Jul 2007 00:10 GMT
> hi computer_guy
>
[quoted text clipped - 17 lines]
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.