Click here to Skip to main content
15,885,098 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<script language="javascript" type="text/javascript">
      function Remove(rowid, id) {
          if (confirm('Are you sure you want to do this action?')) {
              $.post("/Store/Delete", { id: id });
              $('#' + rowid).remove();
          }
      }
    </script>
Posted

1 solution

Please use below Code
JavaScript
$.ajax({
                    url: '/Store/Delete/' + id,
                    type: 'DELETE',
                    data: {},
                    dataType: 'json',
                    success: function () {
                        alert("Success");
                    },
                    error: function (e) {
                      alert("Success");
                    }
                });


Controller
C#
public ActionResult Delete(int id)
       {
           return View();

       }

Hope this helps
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900