Hi all! I tried retrieve tree node of current page using SelectSingleNode but i got a error "Object reference not set to an instance of an object".I tried hard code a node Id of other page and it is not null.
var tr = new TreeProvider(); TreeNode tn = tr.SelectSingleNode(CMSContext.CurrentDocument.DocumentID);
Please help me!
Thank!
You need to use CMSContext.CurrentDocument.NodeID
CMSContext.CurrentDocument.NodeID
thank you! I changed DocumentID by NodeID and it work correct!
GiangLt3
Please, sign in to be able to submit a new answer.