title: Show Confirmation Message Yes or No in Asp.Net
body: <p>I have drop-down box where users can select Yes or No, if user selects Yes from the drop-down then i want to show a confirmation box that shows Yes or No option.  If only user selects Yes in the confirmation box then i want to proceed calling my other function which makes an update to the backend database. If user selects No in the confirmation box then i don't want to proceed and cancel the operation.  Here is my drop-down code:
  
  
  <pre><code>OnSelectedIndexChanged="CheckDropDownSelection"
                          runat="server" AppendDataBoundItems="true" Height="16px"&gt;
                          &lt;asp:ListItem Text="-- Please Selet --" Value="-- Please Selet --"&gt;&lt;/asp:ListItem&gt;
                          &lt;asp:ListItem Text="YES" Value="YES"&gt;&lt;/asp:ListItem&gt;
                          &lt;asp:ListItem Text="NO" Value="NO"&gt;&lt;/asp:ListItem&gt;
                      &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>here is my code behind: </p>
  
  <pre><code>protected void CheckDropDownSelection(Object sender, EventArgs e)
      {
  
          if (ddl_CloseTask.SelectedValue == "YES")
          {
              CloseTask();
          }
          else
          { 
  
          }
  
      }
  
      protected void CloseTask()
      { 
  
          // here is where i close the task
  
      }
  </code></pre>