Events in my dynamically loaded user controls do not fire in ASP.NET Web Application

前端 未结 2 1592
时光说笑
时光说笑 2021-01-24 12:58

I have ASP.NET Web Application that contains MasterPage, ASPX Page where I load User Controls dynamically into UpdatePanel containing PlaceHolder based on menu selection. This w

2条回答
  •  醉酒成梦
    2021-01-24 13:27

    Have you tried attaching the event in the Page_Init event instead of the Page_Load? This is how I do event assignment in my dynamic-control applications, haven't had any problems with that. Also, you mention this is being done in an UpdatePanel, is it in the content template? If so, are you adding appropriate triggers to it (If indeed you want this to happen in an AJAX manner)?

    Are you setting the "autopostback" property to true?

    Seeing some code would definitely help...

提交回复
热议问题