Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

getIdfrommodelOnClickAjax

      <input type="submit" value="Update Status" class="ids" data-id="@sheet.ID" onClick="UpdateStatus(@sheet.ID)" />
        
      <script>
      function UpdateStatus(string id) {
      $.ajax({
        type: "POST",
        url: "/UpdateStatus",
        contentType: "application/json; charset=utf-8",
        data: {"id": id},
        dataType: "json",
        success: function() { alert('Success'); },
        error: function() { alert('Error'); }
       });
       }
      </script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #getIdfrommodelOnClickAjax
ADD COMMENT
Topic
Name
3+7 =