Accessing dynamically created textboxes text

你。 提交于 2019-12-02 01:35:51

The issue is these text boxes need recreated in the Load event of the page, every single time, so that both events and values can be hooked back up and retrieved.

I think the most straight forward approach, in your case, would be to extend idea #1 that you had already tried. Build a List of these controls with enough information to recreate them in Load, but you need to store that List in either ViewState or Session.

ViewState["DynamicControls"] = list;

or

Session["DynamicControls"] = list;

I would use ViewState if you can because it gets destroyed when the user leaves the page.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!