title: Confirm Box in Asp.Net
body: <p>CODE</p>
  
  <pre><code>protected void btnSelectInvioces_Click(object source, EventArgs 
  {
      try
      {
          // some code here
          if(a == b)
          {
              // open confirmation box
              if(OK)  // i click ok button of confirm box
              {
                  // proceed further...
              }
          }
      } 
      catch()
      { }
  }
  </code></pre>
  
  <p>I need to have a Confirm box only when satisfying a condition from server side.</p>
  
  <p>I tried using <code>RegisterClientScript</code>.</p>
  
  <p>What is happening is, it is executing my whole code and then giving me pop up.</p>
  
  <p>BUT, I want to open popup at certain point. When it opens, further code should not be executed unless and until I click OK/Cancel button of that confirmation box</p>