下拉列表的Onselected索引已更改 [英] Onselectedindex changed.of Dropdownlist

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

问题描述



我有abc.aspx页面.
在同一页面中,我放置了iframe以在提交按钮单击时显示结果..在abc.aspx页面中,有两个下拉列表DDL1和DDL2 ..

在DDL1下拉列表中,我已从数据库中填充了国家/地区,对于所选国家/地区,我必须在DDL2中填充其状态....
但是当我将DDL1使用selectedindexedchanged事件..然后它会自动回发,并且iframe在同一abc.aspx中重复两次..

所以我必须避免...我的目标是在DDL1中填充国家/地区,然后在DDL2中填充该国家/地区的状态..并且单击提交按钮时,我必须在iframe页面中显示相对于所选国家/地区和国家/地区的结果(数据) ...

在Advanced中感谢

Hi,

I have abc.aspx page.
And in the same page i have put iframe for showing result on submit button click.. in abc.aspx page there are two dropdownlist DDL1 and DDL2..

In DDL1 dropdownlist i have populated countries from database and with respect to selected country i have to populated its state in DDL2....
but when i use selectedindexedchanged event for DDL1..then it autopostback and iframe is repeated twice ..in the same abc.aspx.

so i have to avoid it ...my target is populate country in DDL1 and onchange of that country populate state in DDL2..and onclick of submit button i have to show result(data) in iframe page with respect to selected country and state...

Thanks in Advanced

推荐答案

请参阅本教程

http://www.tamilcodes.com/document.aspx?content=Tutorials&id=36 [^ ]
See this tutorial

http://www.tamilcodes.com/document.aspx?content=Tutorials&id=36[^]


查看此链接

http://www.dotnetexpertsforum. com/how-to-to-change-the-data-in-dropdownlist-based-up-on-selection-t1903.html [
check out this link

http://www.dotnetexpertsforum.com/how-to-change-the-data-in-dropdownlist-based-up-on-selection-t1903.html[^]


将您的下拉列表放在更新面板中,这是避免刷新页面的最佳方法
place your dropdownlist in update panel this is best way to avoid refresh the page


这篇关于下拉列表的Onselected索引已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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