Retry Popup on Ok
<p>I have not stated anywhere in my code nor JavaScript that the page should refresh upon clicking the OK button. But as the user clicks the OK button, the retry popup comes up. 
I am not sure what is the reasoning behind this.</p>

<p>Here is my code for the OK button:</p>

<pre><code>protected void btn_ok_click(object sender, EventArgs e)
{
    tree_items.Nodes.Clear();           
    TableClass.MainTable = new DataTable();

    SqlConnection connection1 = new SqlConnection();
    connection1.ConnectionString = ConfigurationManager.ConnectionStrings["A"].ConnectionString;

    SqlCommand command1 = new SqlCommand("GetStuff", connection1);
    command1.CommandType = CommandType.StoredProcedure;

    command1.Parameters.Add(new SqlParameter("@Id", solution_id));

    command1.CommandTimeout = 600;
    SqlDataAdapter adapter1 = new SqlDataAdapter(command1);

    connection1.Open();
    adapter1.Fill(TableClass.MainTable);

    GenerateTreeView(TableClass.MainTable);    

    adapter1.Dispose();
    command1.Dispose();
    connection1.Dispose();
}
</code></pre>

<p>Here is the JavaScript for OK button:</p>

<pre><code>&lt;asp:Button ID="btn_ok" runat="server" Height="32px" OnClick="btn_ok_click"
    Text="OK" Width="100px" /&gt;
</code></pre>

<p>Please help.
Here is the GenerateTreeviw code:</p>

<pre><code>private void GenerateTreeView(DataTable table)
        {
            DataRow[] foundRows = table.Select("ParentId = -1", "OrderIndex");
            TreeNode RootParentNode = null;

            int j = 1;
            foreach (DataRow i in foundRows)
            {
                string NewParentNodeName = i.Field&lt;string&gt;("Name");

                string NewParentNodeKey = Convert.ToString(i.Field&lt;int&gt;("ItemId"));
                RootParentNode = new TreeNode(NewParentNodeName, NewParentNodeKey);              
                i["OrderIndex"] = j;
                j++;


                GenerateChildNodes(table, NewParentNodeKey, RootParentNode);
                tree_items.Nodes.Add(RootParentNode);
            }
        }
</code></pre>
