Asp.net 如何选择要在ASP上显示的图像作为其源';是由VB变量定义的吗?

Asp.net 如何选择要在ASP上显示的图像作为其源';是由VB变量定义的吗?,asp.net,vb.net,Asp.net,Vb.net,我有一个字符串变量,带有我想要的图像所在的url,如何将该值传递给图像?我试过了,但没用 <asp:Image ImageUrl="" runat="server"/> <asp:Image Id="image1" ImageUrl="<%= yourVariable %>" runat="server"/> image1.ImageUrl = "http://example/logo.png"

我有一个字符串变量,带有我想要的图像所在的url,如何将该值传递给图像?我试过了,但没用

<asp:Image ImageUrl="" runat="server"/>

<asp:Image Id="image1" ImageUrl="<%= yourVariable %>" runat="server"/>
image1.ImageUrl = "http://example/logo.png"