Я получаю следующую ошибку при запуске приложения MVC, состоящего из плагинов сетки jquery.
The parameters dictionary contains a null entry for parameter 'page' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult GetCategory(System.String, System.String, Int32, Int32)' in 'ecom.Controllers.AdminController'. To make a parameter optional its type should be either a reference type or a Nullable type.
Parameter name: parameters
public ActionResult GetCategory(string sidx, string sord, int page, int rows)
{
var jsonData = _Category.GetAll().ToJsonForjqGrid("category_id", new[] { "category_id", "category_name" });
return Json(jsonData);
}
В представлении getCategory
я использую его следующим образом:
<script language="javascript" type="text/javascript">
loadProducts();
</script>