Home All Groups Group Topic Archive Search About
Author
26 Jun 2006 11:34 AM
Beb
Hi Ya,

quick question for you. Im a little new to web controls and im trying
to have a control that returns a bitmap image.

So i have created a web control library, added a control,

have the following

public class MyImage : System.Web.UI.WebControls.Image
{
      Public Bitmap MyBitmap()
               {
                        bitmap = new Bitmap(
         300,
         60,
         PixelFormat.Format32bppArgb);
       //........
       // do some stuff
       return bitmap
               }


}


so how can i make it that the image control has the results from the
MyBitmap method?

or am i doing this totally wrong?

Author
27 Jun 2006 6:09 PM
Steve C. Orr [MVP, MCSD]
The image control can only contain a URL.  The URL does not have to be to an
image file, however.  You can give it the URL to a special page that outputs
the result of your bitmap function.

Here's more info and a detailed example:
http://SteveOrr.net/articles/ImproveYourImages.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



Show quoteHide quote
"Beb" <BenSc***@aemail4u.com> wrote in message
news:1151321663.797016.162300@m73g2000cwd.googlegroups.com...
> Hi Ya,
>
> quick question for you. Im a little new to web controls and im trying
> to have a control that returns a bitmap image.
>
> So i have created a web control library, added a control,
>
> have the following
>
> public class MyImage : System.Web.UI.WebControls.Image
> {
>      Public Bitmap MyBitmap()
>               {
>                        bitmap = new Bitmap(
>         300,
>         60,
>         PixelFormat.Format32bppArgb);
>       //........
>       // do some stuff
>       return bitmap
>               }
>
>
> }
>
>
> so how can i make it that the image control has the results from the
> MyBitmap method?
>
> or am i doing this totally wrong?
>