在用户控件中绑定下拉列表 [英] Bind dropdownlist in usercontrol

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

问题描述



我有一个带有4个下拉列表的用户控件,并且在我的宿主页(.aspx)页中有2个下拉列表.如果触发了下拉列表的selectedindexchanged事件之一,我想在用户控件下拉列表中显示相关的值.这个怎么做?请建议我.我正在使用会话,并且通过使用宿主页面中的hiddenfield获取用户控制.

Hi,

I have a user control with 4 dropdownlists and in my host page(.aspx)page I have 2 dropdownlists. If one of the selectedindexchanged events of the dropdownlist is fired, I want to display the related values in the user-control dropdownlist. How to do this? Please advise me. I am using sessions in this and I am getting user control by using hiddenfield in the host page.

推荐答案

您可以编写一个函数来绑定下拉列表用户控制页面(类)并调用该函数来设置/重置下拉列表.
You can write a function to bind the dropdown(s) in the user control page (class) and call that function to set/reset the dropdownlist.


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

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