tags:

views:

22

answers:

1

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
IS there a fuction called GetPostBackControl() which returns the control.. i found this in web.
Senthilkumar
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

related questions