title: How to post button value using ajax functione i already tried below code
body: <p>In Yes,No Dialogbox if click yes button or no button How to post button value using ajax functione i already tried below code please help me out from this problem.</p>
  
  <pre><code> function yesnodialog(button1, button2, element) {
  
              var btns = {};
              btns[button1] = function () {
  
                  **$.ajax({ type: 'POST', url: 'Default.aspx/insertworkpermitstatus', cache: false, data: "{'workpermityes':'" + button1 + "','workpermitno':'" + button2 + "'}", contentType: 'application/json; charset=utf-8', dataType: 'JSON',
                      success: function (data) {
                          if (data.d == true) {
                              alert(button1);
                          }
                      }
                  });**
  
                  Open_Dialog1('#tblPrevSchdWorkPermit', true, true, true, false, 1150, 800, 'slideRight', 'slideLeft', 200, 200, false);
                  element.parents('li').hide();
                  $(this).dialog("close");
               };
              btns[button2] = function () {
  
                  $.ajax({ type: 'POST', url: 'Default.aspx/insertworkpermitstatus', cache: false, data: "{'workpermityes':'" + button1 + "','workpermitno':'" + button2 + "'}", contentType: 'application/json; charset=utf-8', dataType: 'JSON',
                      success: function (data) {
                          if (data.d == true) {
                              alert(button2);
                          }
                      }
                  });
                  // Do nothing
                  $(this).dialog("close");
              };
              $("&lt;div&gt;In case you are creating Work Permit in this System click YES, In case you are following Manual Work Permit outside this System click NO&lt;/div&gt;").dialog({
  
                  autoOpen: true,
  
                  title: 'Create Work Permit',
                  text: 'OK',
                  modal: true,
                  buttons: btns
            });
          }
          $("#aPrevSchdCreateWorkPermit").click(function () {
              yesnodialog('Yes', 'No', $(this));
  
  
          })
  </code></pre>
  
  <p>Thanks In Advance.</p>