Umbraco.Forms.Core.RecordField.CreateFromPage throws Object reference not set exception
This happens on a hidden field.
at Umbraco.Forms.Core.Providers.FieldTypes.HiddenField.get_Values() in d:\TeamCity6\buildAgent\work\278191fcc80f7b16\Umbraco.Forms.Core\Providers\FieldTypes\HiddenField.cs:line 63
at Umbraco.Forms.Core.RecordField.CreateFromPage(Page page, Record record) in d:\TeamCity6\buildAgent\work\278191fcc80f7b16\Umbraco.Forms.Core\RecordField.cs:line 151
at BSessions.GroupWeb.UserControls.InvitationImport.Button1_Click(Object sender, EventArgs e) in C:\sourcecode\GroupWeb\BSessions.GroupWeb\UserControls\InvitationImport.ascx.cs:line 114
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
yes. Seems to work just fine if I change the hidden field to a textstring. It's no hurry though, I had code for creating each field manually in another project.
Umbraco.Forms.Core.RecordField.CreateFromPage throws Object reference not set exception
This happens on a hidden field.
Here's the code
Is CreateFromPage deprecated, i.e. I should create every single field manually or is it something wrong with the hidden field?
If I'm not supposed to use CreateFromPage I would very much like to see an example on how this should be done.
Thanks,
Harald
Comment author was deleted
@Harald,
And if you remove the hidden field does it work ok then? If so looks like it's a bug with the hidden field, let me know and I'll fix it this week.
Cheers,
Tim
Hi Tim,
yes. Seems to work just fine if I change the hidden field to a textstring. It's no hurry though, I had code for creating each field manually in another project.
H.
is working on a reply...