title: How to make a confirm box?
body: <p>I want to show a confirmation box from c# code rather than JavaScript. 
  Is there any way I can have the confirmation box pop up when the below condition is true?</p>
  
  <p>Here is the code so far:</p>
  
  <pre><code>if (items.SelectedNode.ChildNodes.Count &gt;= 1)
  {
      ScriptManager.RegisterStartupScript(this.nav_tree_items, typeof(string), "Alert", "alert('Hello');", true);
  }
  </code></pre>
  
  <p>I have already tried add.attributes, but that does not work. </p>
  
  <p>I also tried the following but on click of cancel it performs an action anyway:</p>
  
  <pre><code>if (items.SelectedNode.ChildNodes.Count &gt;= 1)
  {
      ScriptManager.RegisterStartupScript(this.nav_tree_items, typeof(string), "Confirm", "Confirm('Hello');", true);
  }
  </code></pre>