Wednesday, August 22, 2012

An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter

I got this error when i redirect to another action with parameters.
In my case, the problem was parameter name. Add correct parameter.

return RedirectToAction("ProductTryout", new RouteValueDictionary(new { controller = "Catalog", action = "ProductTryout", productId = model.Id }));

No comments:

Post a Comment

TinyMCE Insert/Edit link not editable

 To fix this add  e.stopImmediatePropagation()  as below. $(document).on('focusin', function (e) {             if ($(e.target).close...