Hi Guys,
I have a Delete button on Edit Form Mode.
I want to send the whole form data to the controller when this button is clicked in Edit mode.
I have a ViewModel on View which has data in it and displayed to user with input fields. Now if user clicks Delete then this whole data needs to be sent to controller.
This is my delete method in Controller
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Delete(CustomerVM customerVM)
{
//Delete logic here..
}
What i have done is when user clicks delete button then i use below jquery to post whole data but it gives me error 'Stack overflow at line:0'
<button name="Delete" onclick="$.post('/Customer/Delete',this); return false;" type="button">Delete</button>
Do anyone have any idea how can i accomplish this thing?
Thanks,