I'm new to WebAPI... I know how to create an MVC View retuning from a request when not using the WebAPI.
Typically, in the _Layout.cshtml page, you have an "Index" controller action method that is executed for a particular controller and the Index View comes up fine.
I've tried several things, but cannot get the default View to come up when using a WebAPI controller. For instance, I have a "GetCategories" action method inside the WebAPI controller.
Instead of the non-WebAPI controller method where the "Index" route works (via my _Layout.cshtml page), I don't know what to place inside here where a default view would come up.
<li>@Html.ActionLink("Categories", "GetCategories", "Categories")</li>
Can someone please point me in the right direction here?
Note that I changed the action method to "GetCategories" to agree with what I have in the WebAPI controller, but obviously, like I mentioned, doesn't come up with the corresponding View name that I have for it under the Views/Categories folder (GetCategories).
I get the error "Requested URL: /Categories/GetCategories" not found.
viewwith WebApi. Probably your route definition(s) for WebApi are not complete or not called.