Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
private Node _currentNode = Node.GetCurrent();
protected void Page_Load(object sender, EventArgs e) { _currentNode = _currentNode.Parent.Parent; }
Content--Item1----Item2------Web1
//THIS RETURNS Object not set to an instance of an object. I running this on Web1 page, I expect to get a handle of Item1.
Please advise procedure.
Not sure if this is right (haven't tested) but try
_currentNode.Parent.Parent.Id;
Thanks
Tom
Tom is close, this should do it:
private Node _currentNode = Node.GetCurrent(); protected void Page_Load(object sender, EventArgs e) { _currentNode = New Node(_currentNode.Parent.Parent.Id); }
@ Tom - That would only get me the id which is an int and wouldn't be of the same type ... Node vs. Integer. Didn't see your post Sean I'm trying that now.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to obtain parent of a parent via .NET
Content
--Item1
----Item2
------Web1
//THIS RETURNS Object not set to an instance of an object. I running this on Web1 page, I expect to get a handle of Item1.
Please advise procedure.
Not sure if this is right (haven't tested) but try
Thanks
Tom
Tom is close, this should do it:
@ Tom - That would only get me the id which is an int and wouldn't be of the same type ... Node vs. Integer. Didn't see your post Sean I'm trying that now.
is working on a reply...