UserControl's Event Handler not firing

后端 未结 4 1918
攒了一身酷
攒了一身酷 2021-01-05 15:23

I dynamically load a UserControl into a View that\'s in a MultiView control. Although the UserControl adds an event handler, the event never fires.

What am I missin

4条回答
  •  没有蜡笔的小新
    2021-01-05 16:12

    I am thinking it is not firing because you are loading the control in your page's prerender event. Upon postback, the control is being lost because there is no view state for it. Therefore there is no control to fire its event. Try to load the control in the page's init event. Let us know what happens!

提交回复
热议问题