Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (2.x): Deployment > Show Path Example - Problem with SF

Show Path Example - Problem with SF

  • Paul Kavanagh avatar

    Posted on Jan 24, 2007 (permalink)

    Hi,
    Great example at http://www.telerik.com/community/forums/thread/b311D-eaged.aspx for what I want to do. That is, highlight the root parent of the page I am on. Problem with the example is the following code that is put in the page load event to call the showpath method:

    Dim clickedItem As RadMenuItem = Menu1.FindItemByUrl(Request.Url.PathAndQuery)

    The Request.Url.PathAndQuery comes back only as default.aspx with the querystring. Assume this is due to URL rewriting for friendly urls. So, how do I get the friendly url for the page we are on to compare with the menu item data for the same page?

    Thanks,

    Paul

    Reply

  • Bob Bob admin's avatar

    Posted on Jan 25, 2007 (permalink)

    Hi Paul,

    Here are a couple of ways to accomplish this:

    1. System.Web.SiteMap.CurrentNode.Url

    1. Request.RawUrl

    There are also other ways to do the same, but they wouldn’t be so convenient.

    Regards,

    Bob
    the telerik team

    Reply

  • Paul Kavanagh avatar

    Posted on Jan 25, 2007 (permalink)

    Thanks, perfect, works like a charm!

    Reply

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (2.x): Deployment > Show Path Example - Problem with SF