I have the following action method
public PartialViewResult AddToBasket(int id, Type type)
{
_basketService.AddToBasket(id, type);
return UpdateBasket();
}
In one of my razor views I am rendering a link like this
@Ajax.ActionLink("Add Box To Basket", "AddToBasket", "Basket", new {id = box.Id, type = typeof(BasketBox)}, new AjaxOptions {UpdateTargetId = "basket", OnSuccess = "showPopover();"}, new {})
This renders a link like this
http://localhost:37913/Public/Basket/AddToBasket/241415?type=MyProject.Shared.Repository.Models.BasketBox
However when AddToBasket
is called, my type parameter is always null.
Is this even possible ?