C# Web browser control is not updating correctly
<p>I'm currently working on an app that technically interacts with an html page that uses dynamic content.</p>

<p>My problem is when I try to append data to the WBC the content isn't updating correctly.</p>

<pre><code>namespace CheckList
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        .... code removed ....

        private void button2_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != null)
            {
                HtmlDocument doc = webBrowser1.Document;
                HtmlElement row = doc.CreateElement("tr");
                HtmlElement cell1 = doc.CreateElement("td");
                HtmlElement cell2 = doc.CreateElement("td");
                cell1.InnerHtml = "[X] " + textBox1.Text;
                cell2.SetAttribute("class", "solved_2");
                cell2.InnerHtml = "Unsolved";
                row.AppendChild(cell1);
                row.AppendChild(cell2);
                doc.GetElementsByTagName("table")[0].AppendChild(row);
                //doc.Write(doc.GetElementsByTagName("HTML")[0].OuterHtml);
                webBrowser1.Document.Body.InnerHtml = doc.Body.InnerHtml;
            }
        }
    }
}
</code></pre>

<p>What currently happens is, I click "add" it should add the html to the page and update and the javascript and what not should still load.</p>

<p>What happens is it adds the content, but the javascript doesn't work after I attempt to reload the content.  The CSS stays in tact though, and the javascript isn't working after that point.</p>

<p>JS Source:</p>

<pre><code>var showalert = true;
var file = "file:///C:/Users/Removed/Documents/Visual Studio 2010/Projects/CheckList/CheckList/bin/Release/";
initiate_instance();

function initiate_instance() {
 //insert
 $.get(file + "saved.html", function(data) {
  //$("table#items").append("&lt;tr&gt;&lt;th width='70%'&gt;Issue&lt;/th&gt;&lt;th width='30%' class='right'&gt;Solved&lt;/th&gt;&lt;/tr&gt;");
  $("table#items").html($("table#items").html() + data);
 });

 //change [X] into a link
 $("table#items tr td").each(function() {
  $(this).html($(this).html().replace("[X]", "&lt;a onclick='return remove(this)' href='#'&gt;[X]&lt;/a&gt;"));
 });

 //change the css
 $("table#items tr:odd").attr("class", "odd");
 $("table#items tr td:eq(0)").attr("width", "70%");
 $("table#items tr td:eq(1)").attr("width", "30%");
 $("td.solved, td.solved_2").click(function() {
  if($(this).attr("class") == "solved") {
   $(this).attr("class", "solved_2");
   $(this).text("Unsolved");
  } else {
   $(this).attr("class", "solved");
   $(this).text("Solved");
  }

  if(showalert == true) {
   alert("Remember, for these changes to keep effect please save before closing the program.");
   showalert = false;
  }
 });
}

//delete rows
function remove(obj) {
 if(showalert == true) {
  alert("Remember, for these changes to keep effect please save before closing the program.");
  showalert = false;
 }
 $(obj).parent().parent().remove();
 return false;
}
</code></pre>
