I need to build a selection containing all child nodes of a particular type where the 'price' property (which is a string) is <= a variable (also a string).
This will obviously do a string match...
var selection = myNode.GiftTypes.Where("price <= \""+costlimit+"\"")
... but I need to convert 'price' and 'costlimit' to float numbers so that I can do...
price <= costlimit // e.g. 8.95 <= 20
I've tried all sorts of things, like price.AsInt(), Int32.Parse(price), but everything throws an error.
Convert string to float number
I need to build a selection containing all child nodes of a particular type where the 'price' property (which is a string) is <= a variable (also a string).
This will obviously do a string match...
... but I need to convert 'price' and 'costlimit' to float numbers so that I can do...
I've tried all sorts of things, like price.AsInt(), Int32.Parse(price), but everything throws an error.
Thanks
Hi Robin
Try this code:
Thanks,
Alex
Thanks, Alex, for such a rapid reply, but this gives an error:
Show, please, all code
is working on a reply...