This function would be useful when someone needs to identify button clicks outside the respective button event Changing the selected object type, it's possible to find other controls as well. public static System.Web.UI.Control GetPostbackControlObject(System.Web.UI.Page pageReference) { System.Web.UI.Control returnObj = null; if (pageReference.IsPostBack) { //- Find postback control's Name in form __EVENTTARGET field... object eventTarget = pageReference.Request.Form["__EVENTTARGET"]; //- if __EVENTTARGET has a value (not null or an empty string), return the control with that name if ((eventTarget != null) && eventTarget.ToString().Trim().Count()>0) { return pageReference.FindControl(eventTarget.ToString().Trim()); } //- That is not working if the postback is trigered by a standard Buttons. // Get the control from the Page.Form collection. foreach (string keyName in pageReference.Request.Form) { Sys...
Universe is within you