title: How to write this Javascript coding in C# code behind?
body: <pre><code>&lt;%--Confirmation Box--%&gt;
  &lt;script type="text/javascript" language="javascript"&gt;
      function alertbox() {
  
        if (confirm("Are you sure?") == true) 
            {
                document.getElementById('&lt;%= hdnYesNo.ClientID %&gt;').value = "YES";
            }
            else 
            {
                document.getElementById('&lt;%= hdnYesNo.ClientID %&gt;').value = "NO";
            }
  
          }
      &lt;/script&gt;
  </code></pre>
  
  <p>How to rewrite this code in C# as codebehind? I would like have a confirm box with yes or no buttons.</p>