473,511 Members | 15,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rendering on to Page object

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
Nov 17 '05 #1
2 1859
You will need to include a page holder control in your pie, bar chart pages.
Then you can easily render to the placeholder image.

"Vyas Bharghava" <vy****@yahoo.com> wrote in message
news:05****************************@phx.gbl...
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

Nov 17 '05 #2
In a webv page, embedded images are requested individually as the tags are
parsed by the browser. You can't put anything INTO a web page other than
text.
--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.

"Vyas Bharghava" <vy****@yahoo.com> wrote in message
news:05****************************@phx.gbl...
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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5257
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table...
2
4716
by: Mike Speak | last post by:
I have a user control that I want to use to render 4 menu items (retrieved from db) on the top of each of my asp.net pages. The user control defines a table, with one TR and one TD. Within the...
5
2614
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
1
1858
by: Jarod | last post by:
Hey When I put my control into DetailsView in a template I see it and it seems as working ok. After compile it works on the page. But in normal view in designer I don't see my detailsView instead...
2
3253
by: Spotnick | last post by:
I have no idea why, but since I'm trying to recreate my website using ASP.NET 2.0 I've encountered so many performance issues that I'm about to give up and continue using v1.1 Seriously, how can...
0
1375
by: Jeff Morgan | last post by:
I have an application that runs on ASP.NET. We have been working through performance testing and it appears that at about 40-50 users, I start to get CPU bound. The application is a three form,...
5
2305
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
6
1954
by: Justin.Voelker | last post by:
Can anyone clue me on on how to have my html page continue rendering past a MySQL error? If you visit www.Base2WebDesign.com, click login, type in anything for a username and password, then view...
1
2932
by: epatrick | last post by:
I have a series of custom controls developed under ASP.NET 1.1, and I've successfully migrated to ASP.NET 2.0. I have also developed a custom class dervied from System.Web.UI.Page, called...
3
2411
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
0
7251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1581
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.