What's the content type for an .aspx page? I can't find one.
Same as an html file, "text/html", because the output from an ASPX page when rendered would essentially be HTML.
jshepler
How do charting controls do it? You drop in a .dll and use it - it creates charts dynamically.
Oh, I see what you mean, I think... You're asking how can charting controls dynamically have the url to their generated image?
Well, I'd try to intercept the request myself by handling the OnLoad() event in the control class, and checking to see if the url has a special query parameter, in which case - clear the response, render the image, and that's it.
In your render method, make the url of the image tag to be the same page with the special query string parameter. This is just how anyone would solve the problem of always having to have image files on the hard drive for them to be embedded in the HTML.
[Idea] Even better, - because the approach above could very easily not work because it's based on the custom control model and you're not programming an ASPX page directly, I'd suggest using
.NET Reflector on the charting control library you speak of and analyze the code yourself to look for the functionality you seek.
It's not exactly ideal, but worth a shot. Besides, if the control has some perfected special way to do it, you wouldn't have to reinvent the wheel... [:D]
Max Kukartse...
Member
590 Points
124 Posts
Re: Embedding an aspx page as a WebResource
Sep 16, 2007 07:25 PM|LINK
Same as an html file, "text/html", because the output from an ASPX page when rendered would essentially be HTML.
Oh, I see what you mean, I think... You're asking how can charting controls dynamically have the url to their generated image?
Well, I'd try to intercept the request myself by handling the OnLoad() event in the control class, and checking to see if the url has a special query parameter, in which case - clear the response, render the image, and that's it.
In your render method, make the url of the image tag to be the same page with the special query string parameter. This is just how anyone would solve the problem of always having to have image files on the hard drive for them to be embedded in the HTML.
[Idea] Even better, - because the approach above could very easily not work because it's based on the custom control model and you're not programming an ASPX page directly, I'd suggest using .NET Reflector on the charting control library you speak of and analyze the code yourself to look for the functionality you seek.
It's not exactly ideal, but worth a shot. Besides, if the control has some perfected special way to do it, you wouldn't have to reinvent the wheel... [:D]