【发布时间】:2019-05-23 09:48:34
【问题描述】:
我在 View1 上有一个 Dropdown,它在 Page_Load 上填充。在下面我有 2 RadioButtons。 When either of that button is selected a partial postback happens which repopulates the Dropdown depending on my selection.重新填充Dropdown 后,我通过单击“下一步”按钮进入下一个视图。在 View2 我有一个 Back Button 当我按那个按钮然后按 Dropdown 返回 View1被重置为其原始状态(意味着它重新填充了在Page_Load 上填充的原始值)。
我检查了我的代码,但没有找到负责重置Dropdown 值的任何内容。任何帮助将不胜感激。
【问题讨论】:
-
您是否将 Dropdown 绑定代码放在 page_load 事件中的 if (!Page.IsPostBack) 下?
-
@KevinShah 是的,我已经把它放在那里了。
标签: c# asp.net updatepanel multiview