title: C#/ASP web, ASP:Checkbox to do messagebox on client side, if yes run server side code
body: <p>I apologize if this has been answered somewhere but I could not find my particular problem's answer.</p>
  
  <p>I have a asp object:</p>
  
  <pre><code> &lt;asp:CheckBox ID="chkRemove"  runat="server" Checked='&lt;%#Convert.ToBoolean(Eval("CommonWord")) %&gt;' OnCheckedChanged
  = "OnCheckedChanged_CommonWord" AutoPostBack="true"  /&gt;
  </code></pre>
  
  <p>Basically I want to show a message box asking if its ok to remove, if no or cancel is selected, don't do a postback (or don't run any server side code), and if yes then run that function "OnCheckedChanged_CommonWord".  </p>
  
  <p>I tried doing a javascript Confirm() call which pops up but if I press yes, the C# server side code does not run ("OnCheckedChanged_CommonWord") the "no" or "cancel" works perfectly as it doesn't do a postback.</p>
  
  <p>P.s. Please no AJAX due to server restrictions for me.</p>