title: Can I databind to an asp.net Image control?
body: <p>I have a listview that is setup like so:</p>
  
  <pre><code>&lt;asp:ListView ID="lv_First" runat="server"&gt;
      &lt;LayoutTemplate&gt;
              &lt;div id="first" class="left slider slideAction"&gt;
                  &lt;div id="itemPlaceHolder" runat="server" /&gt;
              &lt;/div&gt;
      &lt;/LayoutTemplate&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:Image ID="img_Icon" runat="server" ImageUrl="&lt;%# Eval("IconUrl") %&gt;" Visible="false" /&gt; &lt;a id="&lt;%# Eval("ParentId") %&gt;-&lt;%# Eval("ID") %&gt;" title="&lt;%# Eval("HelpText") %&gt;"&gt;&lt;%# Eval("Title") %&gt;&lt;/a&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:ListView&gt;
  </code></pre>
  
  <p>When I have the <code>&lt;asp:Image ID="img_Icon" runat="server" ImageUrl="&lt;%# Eval("IconUrl") %&gt;" Visible="false" /&gt;</code> portion in there it errors out with:</p>
  
  <p>The server tag is not well formed.</p>
  
  <p>If I change it to:</p>
  
  <p><code>&lt;asp:Image ID="img_Icon" runat="server" ImageUrl="http://test.com/test.png" Visible="false" /&gt;</code> It renders fine.  What would cause this to happen?</p>