How to get the control or control Id which caused the post back in asp.net 2.0 page
A:
There is a collection:
Request.Form
That is passed back to form. So iterating through keys you obtain name of controls. But these names matches Control.UniqueId, but not Control.ID
Dewfy
2010-03-23 11:06:35
IS there a fuction called GetPostBackControl() which returns the control.. i found this in web.
Senthilkumar
2010-03-23 11:58:38
No there is no such method, it is concerned with possibility to create dynamicaly as ASP.Net controls as client-side-jscript posyback controls. But good news - it is easy to write it, create iteration over tree of children controls and select those who supports IPostBackDataHandler interface.
Dewfy
2010-03-23 15:39:05