I'm developing a user control like a calendar that displays, for each day, a
set of information: the day of the month, if the day is an holiday then a
green circle at the left corner, if the day is locked then a red circle in
the right corner, if the day is weekend then a blue bar at the bottom, etc...

I need to draw this days dynamicaly, using bitmaps.

Actually I'm rendering, for each day, an IMG tag with a SRC attribute like
"day.day?dayWidth=20&dayHeight=20&date=20071201&lo cked=true".

I've created a class that implements IHttpHandler and I've registered that
class in my web.config so it generates my bitmaps for extensions "*.day".

The values I'm passing (and reading in the HttpContext request parameters) -
dayWidth, dayHeight, date, locked - are properties of a c# class that I
defined and has a lot more of properties that I need during the bitmap
creation.

My questions are:

1- Is there another way of dynamically create these bitmaps?

2- Is it possible to pass an instance of my class, instead of writing all
the relevant values in the src attribute?

Thank you