V
Vyas Bharghava
Hi all,
I have written a server-side component that renders some
charts as images. I want to give the charting classes
(Pie, Bar etc.) the ability to render themselves onto any
active page object. I envisage my users calling my
component from Aspx pages like:
Pie pie = new Pie(configXml);
Pie.Render(this);
The below code
renderer.aspx
-------------
......Page_Load()...
Pie pie = new Pie(configXml);
Response.ContentType = "image/png";
Response.BinaryWrite(pie.GetChartImage());
Response.End();
when used as an image source:
show.aspx
---------
<img src="renderer.aspx" />
works fine. But I want to do the above from within my
component. I can't use the same mechanism as that would
mean changing the content-type, which is not the behavior
I want.
I can embed an aspx file inside my component and extract
it at runtime and even make it call a code-behind page
class inside my component. But I'm unable to figure out
how this mechanism could be hooked to what I want.
Please help.
Regards,
Vyas
I have written a server-side component that renders some
charts as images. I want to give the charting classes
(Pie, Bar etc.) the ability to render themselves onto any
active page object. I envisage my users calling my
component from Aspx pages like:
Pie pie = new Pie(configXml);
Pie.Render(this);
The below code
renderer.aspx
-------------
......Page_Load()...
Pie pie = new Pie(configXml);
Response.ContentType = "image/png";
Response.BinaryWrite(pie.GetChartImage());
Response.End();
when used as an image source:
show.aspx
---------
<img src="renderer.aspx" />
works fine. But I want to do the above from within my
component. I can't use the same mechanism as that would
mean changing the content-type, which is not the behavior
I want.
I can embed an aspx file inside my component and extract
it at runtime and even make it call a code-behind page
class inside my component. But I'm unable to figure out
how this mechanism could be hooked to what I want.
Please help.
Regards,
Vyas