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
Select Case e.Path
Case "test.htm"
Dim wb As New weui
wb.AddForm("","form1","getVimg.htm")
With wb.AddButtonGroup("form1","btg1",True) '垂直排列
.Add("btn1", "查看图片")
End With
e.WriteString(wb.Build) '生成网页
Case "getVimg.htm"
Dim wb As New weui
wb.AddForm("","form1","getVimg.htm")
Dim cmd As new SQLCommand
cmd.ConnectionName = "T"
cmd.CommandText="select top 1 第八列 from DDDDD " '这里第八列是二进制列
Dim dt As DataTable = cmd.ExecuteReader
Dim src As String
If dt.DataRows.Count >0 Then
Dim imagebytes As Byte() = dt.DataRows(0)("第八列")
src = Convert.ToBase64String(imagebytes )
End If
With wb.AddArticle("","ar1")
.UseGallery = True '启用Gallery,必须放在第一行
' .AddImage("./images/004.jpg")
.AddImage("data:image/jpeg;base64," & src)
End With
e.WriteString(wb.Build) '生成网页
End Select