I have the following issue, in my class i use the following:
[PageTypeProperty(SortOrder = 1500, UniqueValuePerLanguage = false,Type = typeof(PropertyFloatNumber), EditCaption = "Volume", HelpText = "Volume in cubic metres")]public virtual float? Volume{get;set;}
In the CMS i enter the following value: 10.2
But when i try to retrieve the value, i get a casting error: "Specified cast is not valid."
Does someone see what i am doing wrong?
Grrr problem solved, had to use double as type, not float ;)
I have the following issue, in my class i use the following:
[PageTypeProperty(SortOrder = 1500, UniqueValuePerLanguage = false,
Type = typeof(PropertyFloatNumber), EditCaption = "Volume", HelpText = "Volume in cubic metres")]
public virtual float? Volume
{
get;
set;
}
In the CMS i enter the following value: 10.2
But when i try to retrieve the value, i get a casting error: "Specified cast is not valid."
Does someone see what i am doing wrong?