I need to renderFormContainerBlockControllerview component as a part of my cshtml page.
I do this :
// Model is of EPiServer.Forms.Implementation.Elements.FormContainerBlock typeawait Component.InvokeAsync(typeof(FormContainerBlockController), new { currentBlock = Model });
But I am getting error at runtime:
System.InvalidOperationException: A view component named 'EPiServer.Forms.Controllers.FormContainerBlockController' could not be found. A view component must be a public non-abstract class, not contain any generic parameters, and either be decorated with 'ViewComponentAttribute' or have a class name ending with the 'ViewComponent' suffix. A view component must not be decorated with 'NonViewComponentAttribute'.
Is there any way to render form view component inside of my cshtml page?
ok, that should work for those, who use aspnet core razor pages site if you want to have a simple api request without epi pages context (to inject forms somewhere), FormContainerBlockController and FormContainerBlock.cshtml will throw null reference exceptions at calling FormsExtensions.GetCurrentPageLink().ToString();
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
I need to render FormContainerBlockController view component as a part of my cshtml page.
I do this :
// Model is of EPiServer.Forms.Implementation.Elements.FormContainerBlock type await Component.InvokeAsync(typeof(FormContainerBlockController), new { currentBlock = Model });
But I am getting error at runtime:
Is there any way to render form view component inside of my cshtml page?