Is it possible to create a custom onfocus server side event for a textbox control?
I would like to simply fire a server side method when a textbox has focus.
I would strongly recommend using client side validation for this. You can use the ASP.NET Validators for this. One of the properties on the validator is to set focus on error. This should be more than enough for what you are trying to do and it also limits the number of server side roundtrips.
If you're really feeling creative, you can look at some of the other validation options and AJAX Control Panel extenders. There are some pretty snazzy validator controls out there. Another option would be to consider using some jQuery validation.
You should still validate on the server, but what you are describing sounds like a perfect it for client validation first.
Ok, i got a web form and on submission validation takes place, if there are errors on the page then these errors get stored in state and a warning sign gets displayed.
Now, when the user goes through the errors, i wanted a popup box to be displayed by the side of the textbox they are currently correcting.
for this to happen i wanted to have an event attached to an onfocus type handle.