简体   繁体   English

如何在UpdatePanel中使用AutoPostBack

[英]How can I use AutoPostBack inside UpdatePanel

I have two DropDownLists inside an UpdatePanel. 我在UpdatePanel中有两个DropDownLists。

The values shown inside the second are dependent of the selectedValue on the first, so, I need AutoPostBack=true. 第二个内部显示的值与第一个上的selectedValue相关,因此,我需要AutoPostBack = true。

But, whenever the selected value in the first DropDownList is changed causes the UpdatePanel reload. 但是,只要更改第一个DropDownList中的选定值,就会导致UpdatePanel重新加载。

How can this be solved? 如何解决呢?

PS.: The UpdatePanel's UpdateMode property is set to Conditional. PS .: UpdatePanel的UpdateMode属性设置为“条件”。

Thanks. 谢谢。

通过添加Page_Init以仅在首次充电时执行一些规则来解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在自动回发事件中使用单选按钮列表中的selectedValue? - How can I use radiobuttonlist selectedvalue in autopostback event? 在updatepanel中将AutoPostBack设置为true的DropdownList验证 - DropdownList validation with AutoPostBack set to true inside updatepanel 如何为 radsearchbox 使用 AutoPostback 功能? - How do i use an AutoPostback functionality for a radsearchbox? 如何使用自动回发? - How to use AutoPostback? 如何正确使用Listview中的UpdatePanel? - How to use correctly UpdatePanel inside a Listview? 复选器内的autopostback =“ true”复选框,单击时UpdatePanel内的页面会弹出顶部 - Check box with autopostback = “true” inside of repeater, inside of UpdatePanel pops page back to top when clicked UpdatePanel中ASP TextBox上的AutoPostBack不起作用 - AutoPostBack on ASP TextBox in UpdatePanel not working 如何在用户控件内使用Asp.Net Ajax UpdatePanel - How to use Asp.Net Ajax UpdatePanel inside an usercontrol 如何在没有AutoPostBack的情况下使asp:Panel与asp:RadioButtonList一起正常使用? - How do I can get asp:Panel to work properly with asp:RadioButtonList without AutoPostBack? 如何使UpdatePanel可以用于多个按钮? - How can I get UpdatePanel to work for multiple buttons?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM