首页 > 解决方案 > C#我无法在html文件中查看图片

问题描述

我的项目中有图像文件夹。我正在查看 html 文件,但无法查看图片。我不明白为什么我无法到达图片。

我的 HTML 代码

<p><img src="/images/aboutus_index.png" width="1020"/></p>

我的解决方案资源管理器

我的 c# 代码读取 html 文件。

Assembly assembly = Assembly.GetExecutingAssembly();
        StreamReader reader = new StreamReader(assembly.GetManifestResourceStream("htmldeneme.index.html"));
        webBrowser1.DocumentText = reader.ReadToEnd();

标签: c#htmlimage

解决方案


推荐阅读