title: How to use Message Box in asp.net
body: <p>I am trying to show a message box to the user where they can select either YES or NO from the message box; if they select Yes i want to call some function and if they select NO then i want to call another function.  That is not what i have now in my my code please help.  thanks 
  Here is my code:</p>
  
  <pre><code> protected void TEST()
      {
          string ID= ddlPr.SelectedValue;
          string PRACTICE_TYPE = DDL_TYPE.SelectedValue;
  
          using (SqlConnection con = new SqlConnection(strConnString))
          {
              using (SqlCommand cmd = new SqlCommand())
              {
                  cmd.Connection = con;
                  cmd.CommandType = CommandType.Text;
                  cmd.CommandText = "SELECT count(*) from [DA2].[QPMS].[QPMS_RESPONSE] WHERE ID=@ID";
                  cmd.Parameters.AddWithValue("@ID", ID);             
                  con.Open();
                  int result = (int)cmd.ExecuteScalar();
                  if (result &gt;=1)
  
                  {
                      //if the user selects YES i want to call some function if user             selects No then i want to call another function.
                      string myscript = "alert ('message');";
                      Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MyScript", myscript, true);                    
  
                  }
                  con.Close();
              }
          }
  
      }
  </code></pre>