i am trying to use edit in mvc application by using the code
[HttpGet]
public ActionResult edit(int id)
{
itembusinesslayer itmbl1 = new itembusinesslayer();
itlist items1 = itmbl1.itemlist.SingleOrDefault(sss => sss.itemcode == id);
return View(items1);
}
but it throws the below error:
The parameters dictionary contains a null entry for
parameter 'id' of non-nullable type 'System.Int32' for method
'System.Web.Mvc.ActionResult edit(Int32)' in
'ItemMaster.Controllers.ItemController'. An optional parameter must be a
reference type, a nullable type, or be declared as an optional
parameter.
Parameter name: parameters
how to solve this issue. not able to proceed further
thanks