我想在 C# 运行时根据面板内的搜索查询显示图像。它是一个网络应用程序。我为在运行时显示图像而编写的代码不起作用。这是代码。
System.Web.UI.WebControls.ImageMap image = new System.Web.UI.WebControls.ImageMap();
image.ImageUrl = reader["image"].ToString(); // Take the path from the database
Panel1.Controls.Add(image); // Display the image
代码工作正常,但图像没有显示在面板内。