modalpopup问题中的下拉列表 [英] dropdownlist in modalpopup problem

查看:99
本文介绍了modalpopup问题中的下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好.
我在下拉菜单中插入dropdownlist.当我选择dropdownlist的项目并单击确定"按钮时,dropdownlist的selectedindex始终为0.

hello.
i insert dropdownlist in modalpopupextender.when i select item of dropdownlist and click ok button alwayes selectedindex of dropdownlist is 0.
modalpopupextender is in updatepanel.

推荐答案

检查页面加载中是否存在条件以检查

如果(!IsPostBack)
{

}

否则,它将每次填充下拉列表,并且回发后您将获得选定的项目索引为0.

〜Amol
Check that you have the condition in the page load to check

if (!IsPostBack)
{

}

Otherwise it will fill the dropdown every time and you will get selected item index as 0 after postback.

~Amol


这篇关于modalpopup问题中的下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆