title: Pulling in a dynamic image in a control based on a url using C# and ASP.net
body: <p>I know this is a dumb question. For some reason my mind is blank on this. Any ideas?</p>
  
  <p>Sorry should have been more clear. </p>
  
  <p>Using a <code>HtmlGenericControl</code> to pull in link description as well as image. </p>
  
  <pre><code> private void InternalCreateChildControls()
      {
          if (this.DataItem != null &amp;&amp; this.Relationships.Count &gt; 0)
          {
              HtmlGenericControl fieldset = new HtmlGenericControl("fieldset");
              this.Controls.Add(fieldset);
              HtmlGenericControl legend = new HtmlGenericControl("legend");
              legend.InnerText = this.Caption;
              fieldset.Controls.Add(legend);
  
              HtmlGenericControl listControl = new HtmlGenericControl("ul");
              fieldset.Controls.Add(listControl);
  
              for (int i = 0; i &lt; this.Relationships.Count; i++)
              {
                  CatalogRelationshipsDataSet.CatalogRelationship relationship =
                      this.Relationships[i];
  
                  HtmlGenericControl listItem = new HtmlGenericControl("li");
                  listControl.Controls.Add(listItem);
  
                  RelatedItemsContainer container = new RelatedItemsContainer(relationship);
                  listItem.Controls.Add(container);
  
                  Image Image = new Image();
                  Image.ImageUrl = relationship.DisplayName;
  
  
  
  
                  LinkButton link = new LinkButton();
                  link.Text = relationship.DisplayName;
  
  
  
                 ///ToDO Add Image or Image and description
                  link.CommandName = "Redirect";
                  container.Controls.Add(link);
              }
          }
      }
  </code></pre>
  
  <p></p>
  
  <p><strong>Not asking anyone to do this for me just a reference or an idea.</strong> </p>
  
  <p>Thanks -overly frustrated and feeling humbled.</p>