0
我正在开发一个asp.net web应用程序使用web数据库的形式。在我的应用程序已存储的图像文件夹中,并为图片链接存储在数据库中 我希望通过采取这些链接从数据库 显示这些图片我尝试了以下代码来显示图像如何显示数据库所采取的链接图像
home.aspx的.cs
protected void Page_Load(object sender, EventArgs e)
{
profile_picture = (string)(Session["link"]); //link has been taken from db
}
home.aspx
<asp:Image runat="server" ID="profile_picture" ImageUrl="Label"></asp:Image>
错误是=>错误4无法隐式转换类型 '字符串' 到 'System.Web.UI.WebControls.Image' 如何解决? 谢谢。