Question

I need to render XForm control on regular page, the one that is not inherited from TempaltePage. Currently I'm getting a message:

Error : Can not create form

With a log entry:

ERROR [85] EPiServer.XForms.WebControls.XFormControl.CreateChildControls - 12.6.1 Can not create form
System.ArgumentNullException: Value cannot be null.  Parameter name: virtualPath
       at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options)
       at EPiServer.XForms.WebControls.XFormControl.CreateChildControls().

I cant inherit from TemplatePage because it requires <head runat="server"> tag, but I'm loading content via ajax and cant have header and other on a page. Is there any way to render XForm in string for example?

Was it helpful?

Solution

Try inheriting from EPiServer.SimplePage. That should work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top