Posted on: 4/15/2011 9:20:49 PM | Views : 311

Hi,
I have a function which is being called  from the pre-render event of the aspx page.
        public static UpdatePanel GetUpdatePanelThatCausedPostback(Page page)
        {
            var c = page.FindControl(ScriptManager.GetCurrent(page).AsyncPostBackSourceElementID);

            while (c != null && !(c is UpdatePanel))
            {
                c = c.Parent;
            }

            if (c != null)
            ...

Go to the complete details ...