So,
If it is a button or imagebutton, the request. Form [buttonid] is not empty,
If it is a linkbutton, the request. Form ["target"] is not blank. // The target here is incorrect. I forgot to spell it. Check the spelling.
In this way, you can call the myprocessevent function after page_load is complete:
Assume that you want to capture the buttons, imagebutton, and linkbutton IDS as follows:
BTN
IMG
Lnk
Private void myprocessevent ()
{
If (request. Form [BTN. uniqueid]! = NULL)
{
BTN control click return
}
If (request. Form [img. uniqueid + ". X"]! = NULL)
{
IMG control click return
}
If (request. Form ["target"] = lnk. uniqueid) // The target is incorrectly spelled.
{
Lnk control click return
}
}
In this way, you can capture the returned events.
This method is also applicable to controls such as dropdownlist and input.
The above text source: http://topic.csdn.net/t/20040808/14/3253421.html
This is something I found by chance. The purpose is to determine the event type in advance, so as to reasonably arrange the load and event processing sequence. It will be often used in the future, record here for future Query