For catching a customized event in asp.net
In JavaScript, use __doPostBack(eventName,”);
And then you replace eventName with anything you wanna call and catch in server side.
In CodeBehind page, you can have a code below to catch the event and execute special tasks
If Request.Form(“__EVENTTARGET”) = eventName Then
your special task execution code.
End If
I know this is out of asp.net sync, but I found this so much convinient when you use javascript a lot with asp.net.





