0
A
回答
1
我不确定你的意思,所以如果这不是你的问题的解决方案,请忽略此答案。
我假设你的意思是,你希望从URL中的代码隐藏下载的图像,存储在本地 形象,这一形象成为浏览器。
要做到这一点,你可以使用以下命令:
标记
<asp:Image ID="image1" runat="server" />
代码隐藏
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string imageName = "downloaded-image.png";
string imagePath = Path.Combine(Server.MapPath(@"~\Images"), imageName);
string imageUrl = "https://encrypted.google.com/images/logos/ssl_logo.png";
WebClient client = new WebClient();
client.DownloadFile(imageUrl, imagePath);
image1.ImageUrl = string.Format(@"~\Images\{0}", imageName);
}
}
希望这有助于。
相关问题
- 1. 从URL下载图像并显示在列表视图中
- 2. 从图像下载图像url
- 3. Web图像下载vs Web图像显示在图像视图
- 4. 允许html2canvas显示图像,并与图像下载
- 5. 从图像URL下载图像到图像视图
- 6. 在asp.net 3.5中使用图像控件显示多个图像
- 7. 图像未在Asp.net图像控件和ImageButton中显示
- 8. 从图像URL加载图像以显示UIImageview中的动画
- 9. ASP.NET图像控件不显示我使用的图像控制的图像
- 10. 从URL下载图像并将其显示在GridView中
- 11. 下载的图像在图像视图中显示为空
- 12. 显示图像从Div到图像控制在Asp.Net
- 13. 图像控件无法显示图像
- 14. 在Android下载并显示图像
- 15. 设置图像从一个URL的图像框与下载
- 16. 从URL下载UITableIViewCell图像
- 17. 从url下载图片并在wp7中的图像控件中打开它
- 18. 从URL下载图像并重命名
- 19. 在图像中显示下载的图像查看
- 20. 显示图像,与其他asp.net控制
- 21. 显示下载图像
- 22. 生成的图像显示与下载
- 23. 从URL显示图像iOS
- 24. 从URL显示图像
- 25. 从URL显示图像
- 26. 在ASP.NET中显示图像
- 27. 在ASP.NET中显示图像
- 28. ASP.net从SQL显示图像
- 29. asp.net从sqlreader显示图像
- 30. 如何在iPhone中显示从URL下载的图像?
你不能简单地使用 ? –
Waqas