|
-
Jan 24th, 2005, 09:01 AM
#1
Thread Starter
Lively Member
Dynamic Images
I'm using a .aspx style of dynamic image where I code in the PAGE_Load procedure of a page and set the contenttype to "image/png"
It's working fine but calling the page_load procedure twice which is a quite expensive procedure.
I can implement a cache of some sort but I'd rather know why it is requested twice.
I've specified the image size in the <img> tag already which was my first suspect.
Help!
-
Jan 24th, 2005, 12:07 PM
#2
Frenzied Member
Re: Dynamic Images
It would help to see the code.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Jan 24th, 2005, 02:23 PM
#3
Frenzied Member
Re: Dynamic Images
Code:
If Not IsPostBack Then
ImageCode
End If
might help a little. You could also set a rendered flag stored in viewstate and only update the image if it is not rendered.... watch out for the no value(null) error that ViewState properties give if not initalized.
I'm not sure why the load fires twice. You could move your code to Render or PreRender and see what happens.
umm why png?
Magiaus
If I helped give me some points.
-
Jan 24th, 2005, 03:58 PM
#4
Thread Starter
Lively Member
Re: Dynamic Images
The code is too long to post but the general design is a number of parameters are passed on the URL, an XML file containing stats is loaded and plotted in various styles in a chart. The procedure is entirely in Page_Load and is returned with in the response stream.
I'll post some code tomorrow if that doesn't help diagnosing the problem at all.
Thanks for the help so far, I'll try looking at the Render events.
Edit: png was just so that I could easily produce a transparent background to the chart. Well, when I say easy I mean painfully awkward due to IE being annoying.
-
Jan 25th, 2005, 04:46 AM
#5
Thread Starter
Lively Member
Re: Dynamic Images
Just for anyone with the same problem:
Set the parameter AutoEventWireUp=False
Dammit, why do some problems have to be so simple but take so long. 4 days that took!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|