Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 asp.net 表和一个“添加”按钮。在每个添加按钮上单击我在 asp.net 表中添加了用户控件。但是当我单击窗体上的任何其他控件时,我的 asp.net 表就会消失。如何将 Asp.net 表放入视图状态?
而不是使用 Page_Load,使用
override protected void OnInit(EventArgs e) { LoadDynamicControls() } private void LoadDynamicControls() { //Load your table here }