Interview Question

Created by admin on Sat, 17/11/2012 - 16:47
Question: 

Suppose you want a certain ASP.NET function executed on MouseOver over a certain button. Where do you add an event handler?

Language: 
Answer: 
It's the Attributesproperty, the Add function inside that property. So btnSubmit.Attributes.Add("onMouseOver","someClientCode();") A simple"Javascript:ClientCode();" in the button control of the .aspx page will attach the handler (javascript function)to the onmouseover event.