'通用事件头,用于发送已经存在的常见文件
Dim fl As String = "d:\web\" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
上面红色的代码要修改,改为实际的目录,以5楼的图片为例,就是:
Dim fl As String = ProjectPath & e.Path
Projectpath是一个全局变量,返回的是项目文件夹