如何使用AppendDataBoundItems =" true"删除有界下拉列表中的重复项 [英] how to remove duplicates from bounded dropdownlist with AppendDataBoundItems="true"
本文介绍了如何使用AppendDataBoundItems =" true"删除有界下拉列表中的重复项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用AppendDataBoundItems =true从有界下拉列表中删除重复项?
谢谢,
解决方案
< blockquote>
在帖子上再次发送数据绑定所以再次添加项目
听起来你只需要在你的Page_Load中检查IsPostback。
如果 IsPostBack 然后
' 加载您的下拉列表
结束 如果
创建下拉方法。如果不是回发,即首次进入,则调用方法。
how to remove duplicates from bounded dropdownlist with AppendDataBoundItems="true"?
thanks,
解决方案
"on post back it databind again so it add the items another time"
Sounds like you just need a check in your Page_Load for IsPostback.
If IsPostBack Then 'load your dropdown End If
Create a dropdown method. If its not postback i.e. First Time Entry, then call the method.
这篇关于如何使用AppendDataBoundItems =" true"删除有界下拉列表中的重复项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文