I have an asp.net user control, userControl1.ascx, and another user control, userControl2.ascx. userControl2 is inside userControl1. userControl1 is inside an UpdatePanel control. userControl2 has a button in it then I want to have do a normal post back when pushed. I want to use ScriptManager.RegisterPostBackControl(button). I have a ScriptManager on a master page. I don’t know how to access the ScriptManager in userControl2 to register the button in the Page_Load event. So, How can I do this?
I have an asp.net user control, userControl1.ascx, and another user control, userControl2.ascx. userControl2 is
Share
You can find the script manager by using a recursive FindControl method. This is not best practice but it will get the job done. The is not really a pretty way to do this.