Controllers
An Umbraco API Controller is an ASP.NET WebApi controller that is used for creating REST services.
Last updated
An Umbraco API Controller is an ASP.NET WebApi controller that is used for creating REST services.
Last updated
Umbraco contains different types of controllers to perform different tasks:
When you make a page request to the MVC application, a controller is responsible for returning the response to that request. The controller can perform one or more actions.
By default, all front-end requests to an Umbraco site are auto-routed via the Index action of a core Controller: Umbraco.Cms.Web.Common.Controllers.RenderController
.
For details on using Render MVC Controllers, see the article.
A SurfaceController is an MVC controller that interacts with the front-end rendering of an UmbracoPage. They can be used for rendering view components and for handling Form data submissions. SurfaceControllers are auto-routed which means you don't have to add/create your own routes for these controllers to work.
All implementations of Surface Controllers inherit from the base class: Umbraco.Cms.Web.Website.Controllers.SurfaceController
.
For details on using Surface Controllers, see the article.
A public API Controller is an ASP.NET Core API controller that is used for creating publicly available REST services. For details on implementing public API Controllers, see the article.
Read the for a comprehensive guide to writing APIs for the Management API.
Umbraco HQ offers a training course covering everything you need to know about working with MVC in an Umbraco context. The course targets anyone interested in learning how to utilize Umbraco´s built-in features and basic functionality with standard MVC.
to learn more about the topics covered and how it can enhance your Umbraco development skills.