<input type="button" value="Delete" class="btn btn-danger" onclick="location.href='@Url.Action("DelRec", "MyController")'" />
<input type="button" value="Delete" class="btn btn-danger" onclick="location.href='@Uthat's what your question stated!rl.Action( "DelRec", "MyController")'" />
I want to take the ID (in this case 5017)You were needed take id from edit url, and then to pass id to DelRec!
send it to the controller action (DelRec)
Open in new window
To get id from URL (as your current url is : localhost:99998/MyControllStore into variable [myId]
Open in new window
To pass parameter (here id) use below code (use variable [myId])Open in new window