As you may know the ImageGenerator is a base class so you have to override the DefaultHeight and Width to make it possible to change the values:
<%@ Image Language="C#" Class="Image" %>
using System;
using System.Drawing;
public class Image : System.Web.UI.Imaging.ImageGenerator {
protected override void RenderImage (Graphics g)
{
g.FillRectangle(Brushes.Blue, 0, 0, 300, 400);
g.DrawString("Hello World", new Font("Verdana", 12), Brushes.White, 0, 0);
}
protected override int DefaultHeight
{
get { return 400; }
}
protected override int DefaultWidth
{
get { return 300; }
}
}
/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT
CornerstoneMy Blog, ASP.Net 2.0 etc