title: Is there a way I can make a div runat server? So i can turn it into a control?
body: <p>Is there a way I can make a div runat server? So i can turn it into a control? In asp.net? </p>
  
  <p><strong>EDIt:</strong> </p>
  
  <p>IF so how can I tell my code below to make div ID=test runat server?</p>
  
  <pre><code>            while (reader.Read())
              {
                  System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                  div.Attributes["class"] = "test";
          //div.Style["float"] = "left";
  
                  div.ID = "test";
                  Image img = new Image();
                  img.ImageUrl = String.Format("{0}", reader.GetString(1));
                  // this line needs to be represented in sql syntax
                  //img.ImageUrl = "~/userdata/2/uploadedimage/batman-for-facebook.jpg";
                  img.AlternateText = "Test image";
  
                  div.Controls.Add(img);
                  div.Controls.Add(ParseControl(String.Format("&amp;nbsp&amp;nbsp&amp;nbsp;"+"{0}", reader.GetString(0))));
                  div.Style["clear"] = "both";
                  test1.Controls.Add(div);
  
              }
  </code></pre>