e.Form.TimerEnabled = False
Dim ftp1 As New FtpClient
ftp1.Host="120.198.124.195"
ftp1.Account = "und8042"
ftp1.Password = "und8042ssa"
If ftp1.Upload("c:\data\default.html",e.form.controls("TextBox2").text & "-" & e.form.controls("TextBox3").text & "-" & e.form.controls("TextBox4").text & ".html") = True Then
Messagebox.show("提交完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("提交失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
以上这段代码是,将default.html,按TextBox2+TextBox3+TextBox4的TEXT命名在FTP生成文件;
如果返过来,需要根据TextBox2+TextBox3+TextBox4的TEXT,从FTP下载指定的文件,那代码如何写,小生写了拼了以下代码,但是不行,请老师给予指点
Dim ftp1 As new ftpclient
ftp1.host="120.198.124.195"
ftp1.Account = "und8042"
ftp1.password = "und8042ssa"
If ftp1.Download("\e.form.controls("TextBox2").text & "-" & e.form.controls("TextBox3").text & "-" & e.form.controls("TextBox4").text & ".html"“,"c:\data\default.html",) = True Then
Dim web As WinForm.WebBrowser = e.Form.Controls("WebBrowser1")
web.OfficeToolBar = True
web.Address = "c:\data\default.html"
End If