Professional Web Applications Themes

Rendering on to Page object - ASP.NET General

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 ...

  1. #1

    Default 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
    Vyas Bharghava Guest

  2. #2

    Default Re: Rendering on to Page object

    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" <vyas_b> wrote in message
    news:051a01c3504b$b1916150$a001280aphx.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

    Alvin Bruney Guest

  3. #3

    Default Re: Rendering on to Page object

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

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

    "Vyas Bharghava" <vyas_b> wrote in message
    news:051a01c3504b$b1916150$a001280aphx.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

    Kevin Spencer Guest

Similar Threads

  1. Dynamic content and page rendering
    By @ndyB in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: September 9th, 08:09 AM
  2. error - object uses relative colorimetric rendering intent
    By lister110@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 7
    Last Post: July 21st, 07:07 PM
  3. Replies: 1
    Last Post: December 12th, 08:34 AM
  4. RENDERING 3D OBJECT OUTLINE
    By chicoboy in forum Macromedia Director 3D
    Replies: 2
    Last Post: April 28th, 04:42 PM
  5. Replies: 1
    Last Post: October 2nd, 04:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139