This project is read-only.

ASP.NET WebForms

Web Forms are the heart and soul of ASP.NET. Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request.

Image Generation

Last edited Oct 27, 2008 at 1:58 PM by ScottGal, version 7


WikiZhao May 18, 2012 at 10:56 AM 
What 's new?

Satish_Srivastva Jun 27, 2011 at 2:49 PM 
Gud One..

bitburner Jan 29, 2009 at 4:49 PM 
For some reason when I use this control the following method is NEVER called

public override ImageInfo GenerateImage(NameValueCollection parameters) {
// Add image generation logic here and return an instance of ImageInfo
Bitmap bit = new Bitmap(300, 60);
Graphics gra = Graphics.FromImage(bit);
gra.DrawString(parameters["Hello"], new Font(FontFamily.GenericSansSerif, 16), Brushes.Black, 0, 0);

return new ImageInfo(bit);

I thought this thing was just supposed to work out of the box - I ran this directly from the example posted with the control and the results were less than spectacular. What do I need to do or what did I mess up on this that the overload is never getting called?


alexb Oct 20, 2008 at 12:34 PM 
For the sake of open source competition, SharpPieces proposes a control with similar functionality, maybe a little bit easier to use, . Check out the rest of examples; the control is free and open source here on codeplex.

smnbss Sep 22, 2008 at 8:58 PM 
We can add the handler extension to IIS dynamic cache when using this handler but it could be useful to add an option to automatically store the generated images into a temporary folder.
I think the rendering time is quite CPU expensive so it would be useful to be able to pregenerate images in staging environment and push the images to the live server when pushing new versions of the site.

PabloBlamirez Aug 21, 2008 at 11:28 PM 
When developing for a popular website we implemented a similar feature. One feature that we quickly discovered we needed was the ability to lock down requests to the fancy text generator handler to only calls originating from known sources (referrer) to prevent our bandwidth being used by all and sundry. This is fine if the images are only intended to be used as page content, but if the handler is to be browsed to directly then this simple approach is probably not sufficient. I'm not sure if this fits in to this project directly or not but is something to bear in mind if you are going to implement any kind of image handling that is fancy enough for other people to want to steal.