Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试显示生成的图像,如下所示:
Response.Write("<img src='" & filepather & "'/>")
其中 filepather 被定义为图像的字符串。这是正确的文件路径,我没有得到“损坏的图像链接”图标。此代码位于 aspx 页面内的 vb 脚本中。
我在这里忘记了什么吗?如果我做
response.write("hello"),
它工作正常。
确保filepather字符串包含图像的虚拟地址而不是物理地址。
filepather
就像我已经测试过这个并且工作正常。
Dim filePath As String = "http://localhost:2025/Styles/Images/logo.png" Response.Write("<img src='" & filePath & "'/>")