found and use node position in C# Options
lpastor
Posted: Monday, September 15, 2008 2:08:38 PM

Rank: Aficionado

Joined: 8/4/2008
Posts: 111
Location: Serbia
Hi

I want to implement navigation like previous and next arrow in C# user control.

how can I exam is the current page-node is a first child (don't show previous) or it is a last node in branch- don't show next arrow?

so is there next , first, previous properties in C# for XSLT ?

thanks
lpastor
Posted: Monday, September 15, 2008 2:39:31 PM

Rank: Aficionado

Joined: 8/4/2008
Posts: 111
Location: Serbia
Maybe somebody going to need that

Quote:
Node currentNode = Node.GetCurrent();
Node parentNode = currentNode.Parent;
int childNum = parentNode.Children.Count;
int firstNodeID = parentNode.Children[0].Id;
int lastNodeID = parentNode.Children[childNum-1].Id;


if (currentNode.Id == firstNodeID)
prevArrow.Visible = false;
else
prevArrow.Visible = true;

if (currentNode.Id == lastNodeID)
nextArrow.Visible = false;
else
nextArrow.Visible = true;


Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.