参考:
http://www.foxtable.com/mobilehelp/scr/0044.htm
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"
e.WriteFile(fl)
End Select
Else
Dim sb As New StringBuilder
sb.Appendline("我想显示一个图片<br/><br/>")
Select Case e.path
Case "a.htm"
sb.AppendLine("<img src='/images/abc.jpg'>")
Case "sub1\a.htm"
sb.AppendLine("<img src='/images/abc.jpg'>")
Case "sub1\sub2\a.htm"
sb.AppendLine("<img src='/images/abc.jpg'>")
End Select
e.WriteString(sb.ToString())
End If
第一个/表示根目录,前面代码红色的部分决定了根目录是那个,这里的根目录是d:\web
/images/abc.jpg就是d:\web\images\abc.jpg
我看不出有难以理解的啊