ContentItem, GetValue method
Hey,
I'm looking for a help with this code:
var manager = ContentManager.GetManager();
var item = manager.GetContent().Where(t => (string)t.GetValue("PRODUCT KEY") == key).FirstOrDefault();
Hello Vitaly,
It seems that the problem is in t.GetValue("PRODUCT KEY"). As argument you should put the name of the property that you want. In C# you can't have property with white space in it's name, so this is not valid property. Use the real (valid) property name like ProductKey. Also instead of (string)t.GetValue("PRODUCT KEY"), you can use t.GetValue<String>("PRODUCT KEY").
Regards,
Bonny Bonev
the Telerik team