WinForm 里面ListBox的问题
生活随笔
收集整理的這篇文章主要介紹了
WinForm 里面ListBox的问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
一直在做B/S 結構的東西,很長時間沒有再接觸C/S 的了;
有如下代碼,發(fā)現(xiàn)C/S 在用B/S的一些方法
private System.Windows.Forms.ListBox clbConditionCreate;
...
this.clbConditionCreate = new System.Windows.Forms.ListBox();
...
string str_SelectConditon="";
str_SelectConditon=(((System.Web.UI.WebControls.ListItem)this.clbConditionCreate.SelectedItem).Value.ToString().Trim());
把clbConditionCreate 選擇內容的Value值保存到str_SelectConditon
有如下代碼,發(fā)現(xiàn)C/S 在用B/S的一些方法
private System.Windows.Forms.ListBox clbConditionCreate;
...
this.clbConditionCreate = new System.Windows.Forms.ListBox();
...
string str_SelectConditon="";
str_SelectConditon=(((System.Web.UI.WebControls.ListItem)this.clbConditionCreate.SelectedItem).Value.ToString().Trim());
把clbConditionCreate 選擇內容的Value值保存到str_SelectConditon
總結
以上是生活随笔為你收集整理的WinForm 里面ListBox的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 美国物流管理协会更名标志全球物流进入供应
- 下一篇: 生活随笔[2005-06-08]