Try our conversational search powered by Generative AI!

Problem PageType Builder and Floating Number

Vote:
 

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?

#50461
May 03, 2011 11:29
Vote:
 

Grrr problem solved, had to use double as type, not float ;)

#50464
May 03, 2011 11:37
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.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.