开发者

Loading user controls dynamically

I have an aspx page and therein I have a dropdown control. Depending on the selected value, I need to load the user control that many times in the page. E.g..if first item is selected, I need to query DB and get how many subsections are their for this value and then load the user control that many times. It is working fine if I load the user controls in Page Load开发者_运维问答. However, If I want the view state to persist in these dynamically added user controls, I need to load them before load in Page_init event. However, when I try to do this in Page_Init, the viewstate for the dropdown has not been restored and I dont know how many usercontrols to load.

Any suggestions?.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜