define class Whatever as session function HandleMyClick *-- do whatever you want the button's click should do. endfunc enddefinethen you put this code somewhere (maybe on the Init of the button)
oHandler = createobject("Whatever") BindEvent(This, "Click", oHandler, "HandleMyClick")HTH