Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
For some reason, I can't add JSON data serialized to a string in SetValue().
Look at this example:
var newEntries = JsonConvert.SerializeObject(entries).ToString();
var newEntries2 = "{\"Entries\":[{\"Name\":null,\"Phone\":\"123455\",\"Message\":\"Test\",\"Date\":\"2015-05-08T11:47:50.0421163+02:00\"}]}";
property.SetValue("ctaEntries", newEntries); property.SetValue("ctaEntries", newEntries2);
Line 4 (newEntries2) works, Line 3 doesn't.
I don't get it...
Stumbled on to this problem again, the solution seems to be to write the following in stead:
property.Properties["ctaEntries"].Value = newEntries;
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
IContent does not contain a definition for SetValue when trying to add serialized Json
For some reason, I can't add JSON data serialized to a string in SetValue().
Look at this example:
var newEntries = JsonConvert.SerializeObject(entries).ToString();
var newEntries2 = "{\"Entries\":[{\"Name\":null,\"Phone\":\"123455\",\"Message\":\"Test\",\"Date\":\"2015-05-08T11:47:50.0421163+02:00\"}]}";
property.SetValue("ctaEntries", newEntries);
property.SetValue("ctaEntries", newEntries2);
Line 4 (newEntries2) works, Line 3 doesn't.
I don't get it...
Stumbled on to this problem again, the solution seems to be to write the following in stead:
property.Properties["ctaEntries"].Value = newEntries;
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.