问题描述
我有两个下拉列表: - ddl1和ddl2。 ddl2填充在ddl1的selectedindexchange事件上,即在运行时。 ddl1和ddl2都有Autopostback =true。 ddl2也处理了selectedindexchange事件。但是当我尝试在ddl2中选择一个项目时,它会刷新页面并显示ddl2中的第一个项目。我在互联网上搜索了它并尝试了各种各样的事情,例如在更新面板中放置ddl2,以及处理pagelifecycle的prerender事件,但它们没有帮助。请提供一些解决方案。这是我的项目所必需的。请帮助
我尝试过:
<$ p $我已经在互联网上搜索了它并尝试了各种各样的事情,例如在更新面板中放置ddl2,以及处理页面生命周期的预渲染事件,但它们没有帮助。我也尝试过设置enableviewstate =True和ViewStateMode =Enabled而没有任何运气。
I have two dropdownlists:- "ddl1" and "ddl2". "ddl2" is populated on selectedindexchange event of "ddl1" i.e. at runtime. "ddl1" and "ddl2" both have Autopostback="true". "ddl2" also has selectedindexchange event handled. But when I try to select an item in "ddl2" it refreshes the page and it shows the 1st item in the "ddl2". I have searched it on the internet and tried various things like putting "ddl2" in update panel, and handling prerender event of pagelifecycle, but they didn't help. Please provide some solution. It is required for my project. Please help
What I have tried:
I have searched it on the internet and tried various things like putting "ddl2" in update panel, and handling prerender event of pagelifecycle, but they didn't help. I have also tried setting enableviewstate="True" and ViewStateMode="Enabled" without any luck.
这篇关于具有autopostback的下拉列表=" true"显示第一项选择任何项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!