How to get who calls PostBack?
There are many controls on my page, and I want to know who is calling the PostBack
page in the Page_Load
event.
+4
user1390378
source share1 answer
For this you can try
string ctr = Page.Request.Params.Get("__EVENTTARGET");
Here ctr
will contain your ID
controls.
__EVENTTARGET
transfer information that calls the PostBack
page
You can also use __EVENTARGUMENT
to pass an argument to this control.
Page.Request.Params.Get("__EVENTARGUMENT")
+6
jams
source share