C# 如何解决系统。图纸参数无效

C# 如何解决系统。图纸参数无效,c#,.net,image,winforms,desktop,C#,.net,Image,Winforms,Desktop,如何解决系统。图纸参数无效 当我使用代码时: string img2 = "http://13.228.146.249:8080/jcr/groups/629.png; byte[] toBytes = Encoding.ASCII.GetBytes(img2); if (toBytes != null) { MemoryStream ms = new MemoryStream(toBytes); ms.Position = 0; picboxserver.Image =

如何解决系统。图纸参数无效 当我使用代码时:

string img2 = "http://13.228.146.249:8080/jcr/groups/629.png;
byte[] toBytes = Encoding.ASCII.GetBytes(img2);
if (toBytes != null)
{
    MemoryStream ms = new MemoryStream(toBytes);
    ms.Position = 0;
    picboxserver.Image = Image.FromStream(ms);
}
picboxserver是picturebox类型。

您想在http://13.228.146.249:8080/jcr/groups/629.png 在你的图片盒里?在这种情况下,只需使用:


您试图将URL字符串作为图像,而不是驻留在该URL上的数据。picboxserver.ImageLocation=img2;
picboxserver.Load("http://13.228.146.249:8080/jcr/groups/629.png");