ASP.Net DropDownList 在转发器中共享数据源
我有一个 ASP.net 转发器,其中包含
内的 DropDownList。我想将所有 DropDownList 绑定到单个数据源:
List<Status> statusList = QuoteRequestLogic.Instance.GetQuoteRequestStatusList();
我知道我可以附加到转发器的 ItemDataBound
事件,找到 DropDownList,并将其绑定到我的 List<状态>
。这是最有效的方法吗?如果不是,那是什么?
提前致谢!
I have an ASP.net repeater that contains a DropDownList inside the <ItemTemplate>
. I would like to bind all of the DropDownLists to a single data source:
List<Status> statusList = QuoteRequestLogic.Instance.GetQuoteRequestStatusList();
I know that I can attach to the ItemDataBound
event of the repeater, find the DropDownList, and bind it to my List<Status>
. Is this the most efficient method? If not, what is?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这可能是实现你想要的最好的方法
It is probably the best possible way to achieve what you want I think