Minggu, 03 April 2011

How To Find Which Control Raised PostBack

There are times in asp.net when I really want to know which control in the page raised caused the page to post back. An easy way to find this is to register an event with the control that raises PostBack and cast the sender property to the appropriate control as shown below. As shown in the above code I am casting the sender property to the appropriate control to find out which control raised

Tidak ada komentar:

Posting Komentar