you can do this using breadcrumb.
1) you need to add breadcrumb to every pages like this
<asp:SiteMapDataSource runat="server" ID="mySiteMapDataSource" ShowStartingNode="false" />
<asp:SiteMapPath ID="SiteMapPath1" runat="server" DataSourceID="mySiteMapDataSource" ParentLevelsDisplayed=6>
2) Then you need to add web.sitemap file by clicking on add new item--->site map--->the name should be web.sitemap.
Note: No need to configure with sitemappath it will configure autometically.
in that sitemap file you can write code like this:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode title="A" description="Home" url="~/A.aspx">
<siteMapNode title="B" description="B" url="~/B.aspx">
<siteMapNode title="C" description="C" url="~/C.aspx" >
<siteMapNode title="D" description="D" url="~/D.aspx" >
<siteMapNode title="E" description="E" url="~/E.aspx" >
<siteMapNode title="z" description="z" url="~/Z.aspx" >
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMap>
I think it should work