title: How to delete dynamically created DIV controls dynamically
body: <p>I created few div's dynamically using C#. Now I want to delete few div's from displayed div's using the div's ID, which created dynamically. I tried in many ways, but didn't solution. So please me to come up with solution. I have created around 200 nodes using below code. I would like to delete using content or div id. Please suggest me the best way to solve this.</p>
  
  <p>public void draw_node(int id, int top, int left, string content)
      {
          string topstr = Convert.ToString(top) + "px";
          string leftstr = Convert.ToString(left) + "px";</p>
  
  <pre><code>    System.Web.UI.HtmlControls.HtmlGenericControl dynDiv =
      new System.Web.UI.HtmlControls.HtmlGenericControl("DIV");
      dynDiv.ID = "window" + Convert.ToString(id); // like window1, window2, window3
      dynDiv.Attributes["class"] = "component window";
      dynDiv.Style.Add(HtmlTextWriterStyle.Top, topstr);
      dynDiv.Style.Add(HtmlTextWriterStyle.Left, leftstr);
      dynDiv.InnerHtml = content; // some no. like 1, 2, 3, 4
      this.Controls.Add(dynDiv);
  
  }
  </code></pre>