Select
Case e.Path
Case
"AddNew.htm"
If e.PostValues.Count =
0
AndAlso
e.Files.Count =
0
Then
Dim sb As New StringBuilder
sb.AppendLine("<form
enctype='multipart/form-data' action='AddNew.htm'
method='post' id='form1'
name='form1'>")
sb.AppendLine("姓名: <input name='xm'
id='xm'><br/><br/>")
sb.AppendLine("部门: <input name='bm'
id='bm'><br/><br/>")
sb.AppendLine("职务: <input name='zw'
id='zw'><br/><br/>")
sb.AppendLine("学历: <input name='xl'
id='xl'><br/><br/>")
sb.AppendLine("照片: <input type='file'
name='zp' id='zp' multiple><br/><br/>")
sb.AppendLine("<input Type='submit' name='Sumbit' id='Sumbit'
value='确定'>")
sb.AppendLine("</form>")
e.WriteString(sb.ToString)
Else
Dim dr As
DataRow =
DataTables("员工").AddNew()
Dim inms() As
String = {"xm","bm","zw","xl"}
'输入框名称数组
Dim cnms() As
String =
{"姓名","部门","职务","学历"} '列名数组,注意列名和输入框必须一一对应,位置不能错乱
For i As
Integer = 0
To inms.Length -1
dr(cnms(i)) = e.PostValues(Inms(i))
Next
If e.Files.ContainsKey("zp")
Then
dr("照片") = e.Files("zp")(0)
e.SaveFile("zp", e.Files("zp")(0), ProjectPath
& "Attachments\" & e.Files("zp")(0))
End
If
dr.Save()
Dim sb As New StringBuilder
sb.AppendLine("增加记录成功!
<br/><br/>")
sb.AppendLine("<a href='AddNew.htm'>继续增加</a>")
e.WriteString(sb.ToString)
End
If
End
Select
我的扩展列是在FTP里头,这个怎么改?尝试着把 e.SaveFile("zp", e.Files("zp")(0), ProjectPath & "ftp://用户名:密码@ip\" & e.Files("zp")(0))
但是没用,提示不支持的路径
[此贴子已经被作者于2019/2/14 21:58:03编辑过]