下拉列表选择索引已更改 [英] Dropdownlist selectedindexchanged

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

问题描述



请用我的下拉列表帮助我

在我的具有两个dropdownlists的asp.net应用程序中,对于dropdownlist1,我在page_load事件期间填充数据,但dropdownlist2需要通过将dropdownlist1的选定值传递给数据库来填充以获取数据.
问题:我不想将控制权传递给服务器的所有dropdownlist1选择,我可以在Windows应用中通过在表单加载事件中获取数据集来实现此目的,并且在DP1的选择更改时可以填充DP2,但是如何在asp.net中实现此目的

在此先感谢...

Hi,

Please help me with my dropdownlist

In my asp.net app having two dropdownlists, for dropdownlist1 I''m filling data during page_load event but dropdownlist2 need to fill by passing dropdownlist1''s selected value to database to fetch data.

Problem: I dont want to pass control to server on every selection of dropdownlist1, I can achive this in windows app by getting dataset in form load event and on selection change of DP1 I can fill DP2 but how can I achive this in asp.net

thanks in advance...

推荐答案

您可以执行相同的操作-只需将检索到的数据保留在会话变量中,并且仅在会话变量为空.
You can do the same thing - just keep your retrieved data in a session variable, and only retrieve the data if the session variable is null.


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

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