hello folks., in umbraco, is it possible to check if certain property exist for particular node ? for example, i am having 5 nodes and i am having media picker property for first node alone.. i need to check all the nodes whether media picker property is available for nodes or not? thank you
A:
I think you can just check property existence by comparing to null:
Node somenode = new Node(myNodeID);
if (somenode.GetProperty("myProperty") != null)
{
string myProperty = somenode.GetProperty("myProperty").Value.ToString();
//Do something with myProperty
}
Soldarnal
2010-06-08 21:39:29