Can't seem to find any example on how to call generic method with type from javascript using ajax
public virtual JsonResult GetData<T>(SomeClass firstParam) where T : class, ISomeInterface
{
...
}
Call with ajax
...
ajax:
{
url: "@Url.Action("GetData", "Controller")",
type: "POST",
},
...
Edit 1: Just to clarify duplicate report. I'm trying to call generic method not controller so something like this
...
ajax:
{
url: "@Url.Action<SomeClass>("GetData", "Controller")",
type: "POST",
},
...