private SiteMapNode ExpandForumPaths(Object sender, SiteMapResolveEventArgs e) { if (SiteMap.CurrentNode != null) { SiteMap.SiteMapResolve -= new SiteMapResolveEventHandler(this.ExpandForumPaths); SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true); SiteMapNode tempNode = currentNode; if ((tempNode = tempNode.ParentNode) != null) { string hlist = tempNode.ParentNode.Url; tempNode.Title = "Hotel Details"; //if (Request.UrlReferrer != "") HttpContext context = HttpContext.Current; string baseUrl = context.Request.Url.ToString(); // if (Request != null) // { try { ViewState["GoBackTo"] = HttpContext.Current.Request.UrlReferrer; } catch (Exception etr) { string excpt = etr.ToString(); } // } //string vurl = ViewState["GoBackTo"].ToString(); tempNode.Url = ViewState["GoBackTo"].ToString(); Session["HotellistDetails"] = ViewState["GoBackTo"].ToString(); tempNode.ParentNode.Url = Session["Hotellistlinks"].ToString(); } if ((tempNode = tempNode.ParentNode.ParentNode) != null) { HttpContext context1 = HttpContext.Current; string baseUrl1 = context1.Request.Url.ToString(); ViewState["GoBackTo"] = HttpContext.Current.Request.UrlReferrer; string vurl1 = ViewState["GoBackTo"].ToString(); //tempNode.Url = Session["Hotellistlinks"].ToString(); } return currentNode; } return SiteMap.CurrentNode; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)