Created
January 26, 2017 19:12
-
-
Save jamiepollock/d0345ad62572e85a954aeed3e4217895 to your computer and use it in GitHub Desktop.
In Theory (TM)! How to return an Umbraco Form HTML from an ApiController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web; | |
using Umbraco.Web.WebApi; | |
namespace My.Website.Controllers.Api | |
{ | |
public class FormHtmlApiController : UmbracoApiController | |
{ | |
public IHtmlString Get(string id) | |
{ | |
return Umbraco.RenderMacro("FormsRenderForm", new { FormGuid = id }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment