I am adding an event handler like this:
theImage.MouseMove += new MouseEventHandler(theImage_MouseMove);
but in my application, this code gets run every time the page is shown, so I want to attach the event handler only once, but how can I tell if a handler has been set yet or not, something like this:
if(theImage.MouseMove == null) //error
theImage.MouseMove += new MouseEventHandler(theImage_MouseMove);