Forcing browser to reload the "same page" with "mapped URL"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Willy

    Forcing browser to reload the "same page" with "mapped URL"

    I have a website that uses querystrings on a certain page to show multiple
    contents.
    I have created mapped pages to hide the gory details of these querystrings.

    So instead of details.aspx?ID =kldjlkdjldsjlk ds&cat=jjfjfj
    the client sees products.aspx

    I also use these "mapped" pages in my sitemap file.

    This site is multilingual so I have buttons on the page to switch languages.
    The switch works except that the thing insists on going to
    details.aspx?ID =kldjlkdjldsjlk ds&cat=jjfjfj instead of products.aspx. This
    spoils the breadcrumbs that are linked to the sitemap file.

    The code I use is as simple as :
    Me.Page.Respons e.Redirect(Me.P age.Request.Raw Url.ToString, True)
    (rawurl contains products.aspx)
    Can somebody tell me what I am doing wrong ?

    Thanks a lot.

  • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

    #2
    RE: Forcing browser to reload the "same page" with "mapped URL"

    Can you post a "Short but complete" code sample that illustrates your issue?

    -- Peter
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short Urls & more: http://ittyurl.net


    "Willy" wrote:
    I have a website that uses querystrings on a certain page to show multiple
    contents.
    I have created mapped pages to hide the gory details of these querystrings.
    >
    So instead of details.aspx?ID =kldjlkdjldsjlk ds&cat=jjfjfj
    the client sees products.aspx
    >
    I also use these "mapped" pages in my sitemap file.
    >
    This site is multilingual so I have buttons on the page to switch languages.
    The switch works except that the thing insists on going to
    details.aspx?ID =kldjlkdjldsjlk ds&cat=jjfjfj instead of products.aspx. This
    spoils the breadcrumbs that are linked to the sitemap file.
    >
    The code I use is as simple as :
    Me.Page.Respons e.Redirect(Me.P age.Request.Raw Url.ToString, True)
    (rawurl contains products.aspx)
    Can somebody tell me what I am doing wrong ?
    >
    Thanks a lot.
    >

    Comment

    • Willy

      #3
      Re: Forcing browser to reload the "same page" with "mapped URL"

      Hello George,

      All I needed to do was add code
      Protected Sub Page_PreRender( ByVal sender As Object, ByVal e As
      System.EventArg s) Handles Me.PreRender
      Me.Context.Rewr itePath(Me.Requ est.RawUrl)
      End Sub
      to my page to make it work. I didn't know about the *rewritePath* trick.
      But it will sure go into my basket
      I checked with SiteMapPath control and this one is also very happy.

      Thanks a lot.
      Van den Driessche Willy.

      Comment

      • George Ter-Saakov

        #4
        Re: Forcing browser to reload the "same page" with "mapped URL"

        Cool, that was easier than I thought.
        I thought that RawUrl will point to already rewritten Url.

        George.

        "Willy" <willy.van.den. driessche.haha@ skynet.bewrote in message
        news:1FA8F541-7DA0-4056-8DC7-C8D78B44869E@mi crosoft.com...
        Hello George,
        >
        All I needed to do was add code
        Protected Sub Page_PreRender( ByVal sender As Object, ByVal e As
        System.EventArg s) Handles Me.PreRender
        Me.Context.Rewr itePath(Me.Requ est.RawUrl)
        End Sub
        to my page to make it work. I didn't know about the *rewritePath* trick.
        But it will sure go into my basket
        I checked with SiteMapPath control and this one is also very happy.
        >
        Thanks a lot.
        Van den Driessche Willy.

        Comment

        Working...