asp.net,c#中的选定项目 [英] selected items in asp.net,c#
本文介绍了asp.net,c#中的选定项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
现在我想每次打开页面时都选择其中一项(例如,我的列表中有2000,204,209,2012,现在我要在打开页面时选择2012.
我该怎么办?
感谢
解决方案
有关:
myDropdown.SelectedValue = " ;
参考: MSDN:ListControl.SelectedValue属性 [ ^ ]
hi
I have dropdownlist that it get its items from DB in codes.
now I want one of the items be selected when I open the page,everytime(for example in my list have,2000,204,209,2012 ,now I want 2012 was select when open this page.
what do i do?
thanks
解决方案
What about:
myDropdown.SelectedValue = "2012";
这篇关于asp.net,c#中的选定项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文