以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  ComboBox  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=48100)

--  作者:qianqian1530
--  发布时间:2014/3/23 10:01:00
--  ComboBox
Dim ds As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim ftp1 As New FtpClient
Dim dls As List(of String) 
ftp1.Host="***"
ftp1.Account = "***"
ftp1.Password = "***"
dls = ftp1.GetDirList("\\web")

For Each dl As String In dls
     ds.value = dl
Next



这样写的话,为什么 只能输出 一个 目录名呢?

--  作者:lsy
--  发布时间:2014/3/23 10:13:00
--  
For Each dl As String In dls
     ds.value = dl
Next

 

只会显示最后一个dl。

 

楼主想怎么显示,这样:

Dim S As String

For Each dl As String In dls
     s + = dl & "|"
Next
ds.Combolist = s.Trim("|")

--  作者:qianqian1530
--  发布时间:2014/3/23 10:15:00
--  回复:(lsy)For Each dl As String In dls  ...
图片点击可在新窗口打开查看  就是这个意思, 我怎么就没想到 这个办法呢...无地自容啊..