asp.net dynamically added user control saving values after postback

前端 未结 7 819
半阙折子戏
半阙折子戏 2021-01-05 10:27

Here\'s my issue. I have a usercontrol that I want to allow users to add as many instances of as necessary using a button click (each time a button is clicked, I want to ad

7条回答
  •  借酒劲吻你
    2021-01-05 10:37

    Look at your PageLoad and add if(!this.IsPostBack) before the line where you clear the panel.

    this is of course just a guess, but I have seen many questions where the problem was related to this.

提交回复
热议问题