Read my previous post.
You can use this method from Page_Load in the following manner (if you want the ASPX page to return an image).
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
MemoryStream mem = TransparentGif.DrawTransparentGif(
"Test", Color.Red, 128, 128);
Response.Clear();
Response.BufferOutput = true;
Response.ContentType = "image/gif";
Response.BinaryWrite(mem.ToArray());
Response.Flush();
return;
}
}
Recommended reading:
