Click here to Skip to main content
15,867,939 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
In a MVC grid i have an edit button to edit the details.But when i am clicking on the button im unable to call the method.

XML
<script>
    function updatecall(id) {

        alert(id);

        $.ajax({
            url: '@Url.Action("edit", "PhoneBook")',

            cache: false,
            data: {
                'id': id
            },
            success: function (result) { },
            error: function (result) { }
        })
    }

</script>



XML
<a href=@Url.Action("edit", "PhoneBook", new { id = d.MObileNUmber }) title="Edit" >Edit</a>
      <a href="#Delete" id="Delete_pop" onclick="Delete(@d.MObileNUmber)">Delete</a>
  </b>);
Posted

1 solution

XML
try this,

<a href="/ControllerName/MethodName?Parameters" >Edit</a>
 
Share this answer
 

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



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