折腾半天,各种移动文档、以前的图片引用,不管怎么弄图片都不显示
这是首页引用图大代码,怎么弄,都不显示(图片在e:/langwo/201704/)
For Each dr As DataRow In drs
'msgbox(13-1)
Dim zhansz As String = dr("展示照") '定义,年龄
Dim bianh As String = dr("会员编号") '定义,年龄
Dim nianl As String = dr("年龄") '定义,年龄
Dim xuel As String = dr("学历") '定义,学历
Dim huny As String = dr("婚姻状况") '定义,婚姻状况
Dim suozqx As String = dr("所在区县") '定义,所在区县
Dim suozshi As String = dr("所在市") '定义,所在市
Dim suozs As String = dr("所在省") '定义,所在省
'msgbox(14)
With wb.AddArticle("","ar" & bianh)
.AddImage("../langwo/" & zhansz) '现在这样就不显示
'.AddImage("./images/zhanshi/" & zhansz) '之前这样就显示的
msgbox("编号:" & bianh & "照片:" & zhansz)
.Attribute = "style='padding:0.5em;'"
End With
wb.AddForm("","form" & bianh,"test.htm")
'msgbox(15)
With wb.AddInputGroup("form" & bianh,"ipg" & bianh)
With .AddInput("xm" & bianh,"年龄","text")
.Value = nianl & "岁|" & xuel & "|" & huny
.Readonly= True
End With
With .AddInput("pw" & bianh,"城市","text") ' "'">"'" ,表达式留存
.Value = suozqx & ">" & suozshi & ">" & suozs
.Readonly= True
End With
End With
With wb.AddButtonGroup("form" & bianh,"btg" & bianh,False)
.Add("btn1" & bianh, "查看TA的资料", "submit")
End With
Next
这是保存文件代码:
For Each key As String In e.Files.Keys
If key = "up1" Then
For Each fln As String In e.Files(key)
'msgbox(0)
Dim ext As String = fln.Split(".")(1)
NewName = Format(Date.Now, "yyyyMMddHHmmss") & Rand.Next(10000,99999) & "." & ext
'NewName = Format(Date.Now, "yyyyMMddHHmmssffffff") & Rand.Next(10000) & "." & ext
e.SaveFile(key, fln, ProjectPath & Format(Date.Today, "yyyyMM") & "\" & NewName)
'e.SaveFile(key, fln, ProjectPath & Format(Date.Today, "yyyyMMdd") & "\" & NewName)
'e.SaveFile(key, fln, ProjectPath & "Attachments\" & NewName)
dr("展示照") &= iif(dr.IsNull("展示照"), "", vbcrlf) & Format(Date.Today, "yyyyMM") & "\" & NewName
'dr("展示照") &= iif(dr.IsNull("展示照"), "", vbcrlf) & NewName
Next
End If
Next
For Each key1 As String In e.Files.Keys
If key1 = "up4" Then
For Each fln1 As String In e.Files(key1)
'msgbox(1)
Dim ext1 As String = fln1.Split(".")(1)
NewName = Format(Date.Now, "yyyyMMddHHmmss") & Rand.Next(10000,99999) & "." & ext1
'NewName = Format(Date.Now, "yyyyMMddHHmmssffffff") & Rand.Next(10000) & "." & ext1
e.SaveFile(key1, fln1, ProjectPath & Format(Date.Today, "yyyyMM") & "\" & NewName)
'e.SaveFile(key1, fln1, ProjectPath & Format(Date.Today, "yyyyMMdd") & "\" & NewName)
'e.SaveFile(key1, fln1, ProjectPath & "Attachments\" & NewName)
dr("生活照") &= iif(dr.IsNull("生活照"), "", vbcrlf) & Format(Date.Today, "yyyyMM") & "\" & NewName
'dr("生活照") &= iif(dr.IsNull("生活照"), "", vbcrlf) & NewName
Next
End If
Next
这是table页面显示的文件名称:(尝试将下图的\,改成“/”,也显示不成功)
此主题相关图片如下:qq图片201704102007255565.png
[此贴子已经被作者于2018/2/8 17:59:03编辑过]