Nagarjuna Naga

Nagarjuna Naga

  • NA
  • 53
  • 7.5k

Delete confirmtion getting error

Nov 2 2016 4:20 AM

The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Decimal' for method 'System.Web.Mvc.ActionResult Delete(System.Decimal)' in 'HasBroRMSApplication.Controllers.CommentTemplateController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters

mycode
 
@Html.ActionLink("Delete", "Delete", "CommentTemplate", new { id = @item.CommentTemplateID, onclick = "submitTest()" }) 
 
<div id="mdlAlertmsg" class="modal fade" style="padding-top:6em;">
<div class="modal-dialog" style="width:50%">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title " style="padding-left:6em;">
Updating Data
Are you sure to delete?
</h4>
</div>
</div>
</div>
 
js
 
function submitTest() {
$("#mdlAlertmsg").modal('show');
alert('test');
}

Answers (1)