not an asp.net guy by trade but some advice would be great...

trying to extend the events of a asp.net control to include some javascript function onmouseover, onmouseout etc.

Now say i have a form with some controls and i want to add some generic events using the syntax

control.Attributes("onmouseout") = "m_over();"
(m_over being my own js function")

would it be a sensible measure to perform a loop through each control on my form and add the event as in this rough sample...

Code:
            Dim ctr As Object
            For Each ctr In Me.FindControl("Form1").Controls
                    ctr.attributes("onmouseover") = "m_over();"
            Next
or is their a better way. All suggestins welcomed...

Cheers