Why does Transfer hide the target page's address?

Discussion in 'ASP .Net' started by dee, Sep 8, 2005.

  1. dee

    dee Guest

    Hi,
    I'm curious why MS decided to have Transfer hide the target page's url
    invisible?
    Any guesses ?
    Thanks.
    Dee.
    dee, Sep 8, 2005
    #1
    1. Advertising

  2. Microsoft did not decide anything, it is just the behavior of the server.

    On a Redirect, a command is sent back to the browser and it is the
    responsibility of the browser to redirect to the location. On a Transfer,
    no server-browser interaction happens. The server just simply executes
    different code, but the browser has no way of knowing that because it never
    receives any signal from the server. The browser does not care what code
    executes on the server as long as it receives some HTML.

    This is one reason that I will not use Transfer (although it has its
    purpose, but not very often).

    "dee" <> wrote in message
    news:...
    > Hi,
    > I'm curious why MS decided to have Transfer hide the target page's url
    > invisible?
    > Any guesses ?
    > Thanks.
    > Dee.
    >
    Peter Rilling, Sep 8, 2005
    #2
    1. Advertising

  3. dee

    Marina Guest

    Because in this case the browser doesn't get notified that a redirect
    occurred. It thinks it received the page originally requested.
    If you want the new page's URL to show up, use Response.Redirect. This
    informs the browser of the redirect.

    "dee" <> wrote in message
    news:...
    > Hi,
    > I'm curious why MS decided to have Transfer hide the target page's url
    > invisible?
    > Any guesses ?
    > Thanks.
    > Dee.
    >
    Marina, Sep 8, 2005
    #3
  4. dee

    dee Guest

    Thanks Marina,
    Does redirect involve one extra trip to the server?

    "Marina" <> wrote in message
    news:...
    > Because in this case the browser doesn't get notified that a redirect
    > occurred. It thinks it received the page originally requested.
    > If you want the new page's URL to show up, use Response.Redirect. This
    > informs the browser of the redirect.
    >
    > "dee" <> wrote in message
    > news:...
    >> Hi,
    >> I'm curious why MS decided to have Transfer hide the target page's url
    >> invisible?
    >> Any guesses ?
    >> Thanks.
    >> Dee.
    >>

    >
    >
    dee, Sep 8, 2005
    #4
  5. dee

    dee Guest

    Thanks Peter,
    What would be the advantage of using Transfer?

    "Peter Rilling" <> wrote in message
    news:...
    > Microsoft did not decide anything, it is just the behavior of the server.
    >
    > On a Redirect, a command is sent back to the browser and it is the
    > responsibility of the browser to redirect to the location. On a Transfer,
    > no server-browser interaction happens. The server just simply executes
    > different code, but the browser has no way of knowing that because it
    > never receives any signal from the server. The browser does not care what
    > code executes on the server as long as it receives some HTML.
    >
    > This is one reason that I will not use Transfer (although it has its
    > purpose, but not very often).
    >
    > "dee" <> wrote in message
    > news:...
    >> Hi,
    >> I'm curious why MS decided to have Transfer hide the target page's url
    >> invisible?
    >> Any guesses ?
    >> Thanks.
    >> Dee.
    >>

    >
    >
    dee, Sep 8, 2005
    #5
  6. dee

    KMA Guest

    Precisely because it hides the URL. Imagine you have dynamically created
    pages. The URLs don't represent actual pages on your server. You intercept
    the request for a non-existant URL and return your dynamically created page.
    The browser still shows the expected URL, and not the URL of the page that
    actually did the work.

    eg User clicks on link
    www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000.as
    px

    which doesn't exists. Your code looks in the database for the product
    details and sends back html. Users' browser still shows the fake URL.

    Another reasonto use transfer is to reduce round trips.



    "dee" <> wrote in message
    news:...
    > Thanks Peter,
    > What would be the advantage of using Transfer?
    >
    > "Peter Rilling" <> wrote in message
    > news:...
    > > Microsoft did not decide anything, it is just the behavior of the

    server.
    > >
    > > On a Redirect, a command is sent back to the browser and it is the
    > > responsibility of the browser to redirect to the location. On a

    Transfer,
    > > no server-browser interaction happens. The server just simply executes
    > > different code, but the browser has no way of knowing that because it
    > > never receives any signal from the server. The browser does not care

    what
    > > code executes on the server as long as it receives some HTML.
    > >
    > > This is one reason that I will not use Transfer (although it has its
    > > purpose, but not very often).
    > >
    > > "dee" <> wrote in message
    > > news:...
    > >> Hi,
    > >> I'm curious why MS decided to have Transfer hide the target page's url
    > >> invisible?
    > >> Any guesses ?
    > >> Thanks.
    > >> Dee.
    > >>

    > >
    > >

    >
    >
    KMA, Sep 8, 2005
    #6
  7. dee

    dee Guest

    Thanks KMA
    If user clicks on non-existing page url doesnt he get a 404 error?

    "KMA" <> wrote in message news:dfpqi2$dpj$-plus.net...
    >
    > Precisely because it hides the URL. Imagine you have dynamically created
    > pages. The URLs don't represent actual pages on your server. You intercept
    > the request for a non-existant URL and return your dynamically created
    > page.
    > The browser still shows the expected URL, and not the URL of the page that
    > actually did the work.
    >
    > eg User clicks on link
    > www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000.as
    > px
    >
    > which doesn't exists. Your code looks in the database for the product
    > details and sends back html. Users' browser still shows the fake URL.
    >
    > Another reasonto use transfer is to reduce round trips.
    >
    >
    >
    > "dee" <> wrote in message
    > news:...
    >> Thanks Peter,
    >> What would be the advantage of using Transfer?
    >>
    >> "Peter Rilling" <> wrote in message
    >> news:...
    >> > Microsoft did not decide anything, it is just the behavior of the

    > server.
    >> >
    >> > On a Redirect, a command is sent back to the browser and it is the
    >> > responsibility of the browser to redirect to the location. On a

    > Transfer,
    >> > no server-browser interaction happens. The server just simply executes
    >> > different code, but the browser has no way of knowing that because it
    >> > never receives any signal from the server. The browser does not care

    > what
    >> > code executes on the server as long as it receives some HTML.
    >> >
    >> > This is one reason that I will not use Transfer (although it has its
    >> > purpose, but not very often).
    >> >
    >> > "dee" <> wrote in message
    >> > news:...
    >> >> Hi,
    >> >> I'm curious why MS decided to have Transfer hide the target page's url
    >> >> invisible?
    >> >> Any guesses ?
    >> >> Thanks.
    >> >> Dee.
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
    dee, Sep 8, 2005
    #7
  8. dee

    Mythran Guest

    "dee" <> wrote in message
    news:...
    > Hi,
    > I'm curious why MS decided to have Transfer hide the target page's url
    > invisible?
    > Any guesses ?
    > Thanks.
    > Dee.
    >


    It executes another files code.


    Server.Transfer requires no extra round-trip.
    Response.Redirect does.

    You use, as an example, Server.Transfer to transfer to another page when an
    exception occurs so you can show a proper exception. If you use
    Server.Transfer, you can use Server.GetLastError() to get the exception that
    was thrown. If you use Server.Redirect, you cannot. That is one useful
    reason why you would use Server.Transfer :)

    HTH,
    Mythran
    Mythran, Sep 8, 2005
    #8
  9. dee

    Jeremy Ames Guest

    Technically, the page KMA listed does exist. It is just a "worker" page that
    does nothing but processing, and it sends you to the correct page once
    processing is complete. That is generally what you would use a transfer for.

    "dee" <> wrote in message
    news:%...
    > Thanks KMA
    > If user clicks on non-existing page url doesnt he get a 404 error?
    >
    > "KMA" <> wrote in message
    > news:dfpqi2$dpj$-plus.net...
    >>
    >> Precisely because it hides the URL. Imagine you have dynamically created
    >> pages. The URLs don't represent actual pages on your server. You
    >> intercept
    >> the request for a non-existant URL and return your dynamically created
    >> page.
    >> The browser still shows the expected URL, and not the URL of the page
    >> that
    >> actually did the work.
    >>
    >> eg User clicks on link
    >> www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000.as
    >> px
    >>
    >> which doesn't exists. Your code looks in the database for the product
    >> details and sends back html. Users' browser still shows the fake URL.
    >>
    >> Another reasonto use transfer is to reduce round trips.
    >>
    >>
    >>
    >> "dee" <> wrote in message
    >> news:...
    >>> Thanks Peter,
    >>> What would be the advantage of using Transfer?
    >>>
    >>> "Peter Rilling" <> wrote in message
    >>> news:...
    >>> > Microsoft did not decide anything, it is just the behavior of the

    >> server.
    >>> >
    >>> > On a Redirect, a command is sent back to the browser and it is the
    >>> > responsibility of the browser to redirect to the location. On a

    >> Transfer,
    >>> > no server-browser interaction happens. The server just simply
    >>> > executes
    >>> > different code, but the browser has no way of knowing that because it
    >>> > never receives any signal from the server. The browser does not care

    >> what
    >>> > code executes on the server as long as it receives some HTML.
    >>> >
    >>> > This is one reason that I will not use Transfer (although it has its
    >>> > purpose, but not very often).
    >>> >
    >>> > "dee" <> wrote in message
    >>> > news:...
    >>> >> Hi,
    >>> >> I'm curious why MS decided to have Transfer hide the target page's
    >>> >> url
    >>> >> invisible?
    >>> >> Any guesses ?
    >>> >> Thanks.
    >>> >> Dee.
    >>> >>
    >>> >
    >>> >
    >>>
    >>>

    >>
    >>

    >
    >
    Jeremy Ames, Sep 8, 2005
    #9
  10. dee

    Colin Peters Guest

    Yep. but the method I describe involves catching the 404 with a custome
    error page. this custom error page looks at the requested url which is
    passed as a parameter and, for example, does a db lookup on Dustmaster5000.

    the nice thing is that you can tailor the url "pseudo sub directories"
    as much as you want. Different languages for instance. Without actually
    having to create the whole directory tree. also some search engines
    attach relevance to the URL components.

    I don't see how you can create a (maintainable) large website any other way.

    dee wrote:
    > Thanks KMA
    > If user clicks on non-existing page url doesnt he get a 404 error?
    >
    > "KMA" <> wrote in message news:dfpqi2$dpj$-plus.net...
    >
    >>Precisely because it hides the URL. Imagine you have dynamically created
    >>pages. The URLs don't represent actual pages on your server. You intercept
    >>the request for a non-existant URL and return your dynamically created
    >>page.
    >>The browser still shows the expected URL, and not the URL of the page that
    >>actually did the work.
    >>
    >>eg User clicks on link
    >>www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000.as
    >>px
    >>
    >>which doesn't exists. Your code looks in the database for the product
    >>details and sends back html. Users' browser still shows the fake URL.
    >>
    >>Another reasonto use transfer is to reduce round trips.
    >>
    >>
    >>
    >>"dee" <> wrote in message
    >>news:...
    >>
    >>>Thanks Peter,
    >>>What would be the advantage of using Transfer?
    >>>
    >>>"Peter Rilling" <> wrote in message
    >>>news:...
    >>>
    >>>>Microsoft did not decide anything, it is just the behavior of the

    >>
    >>server.
    >>
    >>>>On a Redirect, a command is sent back to the browser and it is the
    >>>>responsibility of the browser to redirect to the location. On a

    >>
    >>Transfer,
    >>
    >>>>no server-browser interaction happens. The server just simply executes
    >>>>different code, but the browser has no way of knowing that because it
    >>>>never receives any signal from the server. The browser does not care

    >>
    >>what
    >>
    >>>>code executes on the server as long as it receives some HTML.
    >>>>
    >>>>This is one reason that I will not use Transfer (although it has its
    >>>>purpose, but not very often).
    >>>>
    >>>>"dee" <> wrote in message
    >>>>news:...
    >>>>
    >>>>>Hi,
    >>>>>I'm curious why MS decided to have Transfer hide the target page's url
    >>>>>invisible?
    >>>>>Any guesses ?
    >>>>>Thanks.
    >>>>>Dee.
    >>>>>
    >>>>
    >>>>
    >>>

    >>

    >
    >
    Colin Peters, Sep 8, 2005
    #10
  11. This has nothing to do with Transfer. For this you would use HttpHandlers
    (or whatever it is named).

    For Transfer you would still have to have the physical page out there,
    right? You still would do something like
    Page.Transfer("MySecondPage.aspx").

    "KMA" <> wrote in message news:dfpqi2$dpj$-plus.net...
    >
    > Precisely because it hides the URL. Imagine you have dynamically created
    > pages. The URLs don't represent actual pages on your server. You intercept
    > the request for a non-existant URL and return your dynamically created
    > page.
    > The browser still shows the expected URL, and not the URL of the page that
    > actually did the work.
    >
    > eg User clicks on link
    > www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000.as
    > px
    >
    > which doesn't exists. Your code looks in the database for the product
    > details and sends back html. Users' browser still shows the fake URL.
    >
    > Another reasonto use transfer is to reduce round trips.
    >
    >
    >
    > "dee" <> wrote in message
    > news:...
    >> Thanks Peter,
    >> What would be the advantage of using Transfer?
    >>
    >> "Peter Rilling" <> wrote in message
    >> news:...
    >> > Microsoft did not decide anything, it is just the behavior of the

    > server.
    >> >
    >> > On a Redirect, a command is sent back to the browser and it is the
    >> > responsibility of the browser to redirect to the location. On a

    > Transfer,
    >> > no server-browser interaction happens. The server just simply executes
    >> > different code, but the browser has no way of knowing that because it
    >> > never receives any signal from the server. The browser does not care

    > what
    >> > code executes on the server as long as it receives some HTML.
    >> >
    >> > This is one reason that I will not use Transfer (although it has its
    >> > purpose, but not very often).
    >> >
    >> > "dee" <> wrote in message
    >> > news:...
    >> >> Hi,
    >> >> I'm curious why MS decided to have Transfer hide the target page's url
    >> >> invisible?
    >> >> Any guesses ?
    >> >> Thanks.
    >> >> Dee.
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
    Peter Rilling, Sep 8, 2005
    #11
  12. dee

    dee Guest

    Why would you create pseudo directories?

    "Colin Peters" <> wrote in message
    news:...
    > Yep. but the method I describe involves catching the 404 with a custome
    > error page. this custom error page looks at the requested url which is
    > passed as a parameter and, for example, does a db lookup on
    > Dustmaster5000.
    >
    > the nice thing is that you can tailor the url "pseudo sub directories" as
    > much as you want. Different languages for instance. Without actually
    > having to create the whole directory tree. also some search engines attach
    > relevance to the URL components.
    >
    > I don't see how you can create a (maintainable) large website any other
    > way.
    >
    > dee wrote:
    >> Thanks KMA
    >> If user clicks on non-existing page url doesnt he get a 404 error?
    >>
    >> "KMA" <> wrote in message
    >> news:dfpqi2$dpj$-plus.net...
    >>
    >>>Precisely because it hides the URL. Imagine you have dynamically created
    >>>pages. The URLs don't represent actual pages on your server. You
    >>>intercept
    >>>the request for a non-existant URL and return your dynamically created
    >>>page.
    >>>The browser still shows the expected URL, and not the URL of the page
    >>>that
    >>>actually did the work.
    >>>
    >>>eg User clicks on link
    >>>www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000.as
    >>>px
    >>>
    >>>which doesn't exists. Your code looks in the database for the product
    >>>details and sends back html. Users' browser still shows the fake URL.
    >>>
    >>>Another reasonto use transfer is to reduce round trips.
    >>>
    >>>
    >>>
    >>>"dee" <> wrote in message
    >>>news:...
    >>>
    >>>>Thanks Peter,
    >>>>What would be the advantage of using Transfer?
    >>>>
    >>>>"Peter Rilling" <> wrote in message
    >>>>news:...
    >>>>
    >>>>>Microsoft did not decide anything, it is just the behavior of the
    >>>
    >>>server.
    >>>
    >>>>>On a Redirect, a command is sent back to the browser and it is the
    >>>>>responsibility of the browser to redirect to the location. On a
    >>>
    >>>Transfer,
    >>>
    >>>>>no server-browser interaction happens. The server just simply executes
    >>>>>different code, but the browser has no way of knowing that because it
    >>>>>never receives any signal from the server. The browser does not care
    >>>
    >>>what
    >>>
    >>>>>code executes on the server as long as it receives some HTML.
    >>>>>
    >>>>>This is one reason that I will not use Transfer (although it has its
    >>>>>purpose, but not very often).
    >>>>>
    >>>>>"dee" <> wrote in message
    >>>>>news:...
    >>>>>
    >>>>>>Hi,
    >>>>>>I'm curious why MS decided to have Transfer hide the target page's url
    >>>>>>invisible?
    >>>>>>Any guesses ?
    >>>>>>Thanks.
    >>>>>>Dee.
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>

    >>
    dee, Sep 8, 2005
    #12
  13. dee

    KMA Guest

    It does have to do with transfer.

    Look at the example I give. The page URL doesn't exist, but it is what the
    client sees in the address bar. A custom 404 page catches the error due to
    non-existant page, strips off the end bit and produces a page of output
    using the Dustmaster5000 details from a db.

    So the custom 404 has something like:

    Transfer("DynamicCreate.aspx?Dustmaster5000");

    If you just redirect then the client issues a second request and his address
    bar changes.

    "Peter Rilling" <> wrote in message
    news:...
    > This has nothing to do with Transfer. For this you would use HttpHandlers
    > (or whatever it is named).
    >
    > For Transfer you would still have to have the physical page out there,
    > right? You still would do something like
    > Page.Transfer("MySecondPage.aspx").
    >
    > "KMA" <> wrote in message

    news:dfpqi2$dpj$-plus.net...
    > >
    > > Precisely because it hides the URL. Imagine you have dynamically created
    > > pages. The URLs don't represent actual pages on your server. You

    intercept
    > > the request for a non-existant URL and return your dynamically created
    > > page.
    > > The browser still shows the expected URL, and not the URL of the page

    that
    > > actually did the work.
    > >
    > > eg User clicks on link
    > >

    www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000.as
    > > px
    > >
    > > which doesn't exists. Your code looks in the database for the product
    > > details and sends back html. Users' browser still shows the fake URL.
    > >
    > > Another reasonto use transfer is to reduce round trips.
    > >
    > >
    > >
    > > "dee" <> wrote in message
    > > news:...
    > >> Thanks Peter,
    > >> What would be the advantage of using Transfer?
    > >>
    > >> "Peter Rilling" <> wrote in message
    > >> news:...
    > >> > Microsoft did not decide anything, it is just the behavior of the

    > > server.
    > >> >
    > >> > On a Redirect, a command is sent back to the browser and it is the
    > >> > responsibility of the browser to redirect to the location. On a

    > > Transfer,
    > >> > no server-browser interaction happens. The server just simply

    executes
    > >> > different code, but the browser has no way of knowing that because it
    > >> > never receives any signal from the server. The browser does not care

    > > what
    > >> > code executes on the server as long as it receives some HTML.
    > >> >
    > >> > This is one reason that I will not use Transfer (although it has its
    > >> > purpose, but not very often).
    > >> >
    > >> > "dee" <> wrote in message
    > >> > news:...
    > >> >> Hi,
    > >> >> I'm curious why MS decided to have Transfer hide the target page's

    url
    > >> >> invisible?
    > >> >> Any guesses ?
    > >> >> Thanks.
    > >> >> Dee.
    > >> >>
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
    KMA, Sep 9, 2005
    #13
  14. dee

    KMA Guest

    2 reasons.

    1) like I said, some search engines attach relevance to the URL components.
    2) it hides the real directory structure from malicious view
    3) it obviates the need for pages like:
    www.myshop.com/ProductDetails.aspx?ProductID=Dustmaster5000

    4) you can have different pseudo directories dependent on local language.


    "dee" <> wrote in message
    news:...
    > Why would you create pseudo directories?
    >
    > "Colin Peters" <> wrote in message
    > news:...
    > > Yep. but the method I describe involves catching the 404 with a custome
    > > error page. this custom error page looks at the requested url which is
    > > passed as a parameter and, for example, does a db lookup on
    > > Dustmaster5000.
    > >
    > > the nice thing is that you can tailor the url "pseudo sub directories"

    as
    > > much as you want. Different languages for instance. Without actually
    > > having to create the whole directory tree. also some search engines

    attach
    > > relevance to the URL components.
    > >
    > > I don't see how you can create a (maintainable) large website any other
    > > way.
    > >
    > > dee wrote:
    > >> Thanks KMA
    > >> If user clicks on non-existing page url doesnt he get a 404 error?
    > >>
    > >> "KMA" <> wrote in message
    > >> news:dfpqi2$dpj$-plus.net...
    > >>
    > >>>Precisely because it hides the URL. Imagine you have dynamically

    created
    > >>>pages. The URLs don't represent actual pages on your server. You
    > >>>intercept
    > >>>the request for a non-existant URL and return your dynamically created
    > >>>page.
    > >>>The browser still shows the expected URL, and not the URL of the page
    > >>>that
    > >>>actually did the work.
    > >>>
    > >>>eg User clicks on link

    >
    >>>www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000

    ..as
    > >>>px
    > >>>
    > >>>which doesn't exists. Your code looks in the database for the product
    > >>>details and sends back html. Users' browser still shows the fake URL.
    > >>>
    > >>>Another reasonto use transfer is to reduce round trips.
    > >>>
    > >>>
    > >>>
    > >>>"dee" <> wrote in message
    > >>>news:...
    > >>>
    > >>>>Thanks Peter,
    > >>>>What would be the advantage of using Transfer?
    > >>>>
    > >>>>"Peter Rilling" <> wrote in message
    > >>>>news:...
    > >>>>
    > >>>>>Microsoft did not decide anything, it is just the behavior of the
    > >>>
    > >>>server.
    > >>>
    > >>>>>On a Redirect, a command is sent back to the browser and it is the
    > >>>>>responsibility of the browser to redirect to the location. On a
    > >>>
    > >>>Transfer,
    > >>>
    > >>>>>no server-browser interaction happens. The server just simply

    executes
    > >>>>>different code, but the browser has no way of knowing that because it
    > >>>>>never receives any signal from the server. The browser does not care
    > >>>
    > >>>what
    > >>>
    > >>>>>code executes on the server as long as it receives some HTML.
    > >>>>>
    > >>>>>This is one reason that I will not use Transfer (although it has its
    > >>>>>purpose, but not very often).
    > >>>>>
    > >>>>>"dee" <> wrote in message
    > >>>>>news:...
    > >>>>>
    > >>>>>>Hi,
    > >>>>>>I'm curious why MS decided to have Transfer hide the target page's

    url
    > >>>>>>invisible?
    > >>>>>>Any guesses ?
    > >>>>>>Thanks.
    > >>>>>>Dee.
    > >>>>>>
    > >>>>>
    > >>>>>
    > >>>>
    > >>>
    > >>

    >
    KMA, Sep 9, 2005
    #14
  15. dee

    dee Guest

    Thanks K that explains it.
    I have a problem using Transfer though. I transfer to a page and the address
    bar still shows the source page. Thats fine. But now I do postback and then
    not only the add bar reveals the true address but also there is
    inconsistancy since they first time browser received the page the add bar
    didnt indicate it.


    "KMA" <> wrote in message news:dfr76c$go1$-plus.net...
    >2 reasons.
    >
    > 1) like I said, some search engines attach relevance to the URL
    > components.
    > 2) it hides the real directory structure from malicious view
    > 3) it obviates the need for pages like:
    > www.myshop.com/ProductDetails.aspx?ProductID=Dustmaster5000
    >
    > 4) you can have different pseudo directories dependent on local language.
    >
    >
    > "dee" <> wrote in message
    > news:...
    >> Why would you create pseudo directories?
    >>
    >> "Colin Peters" <> wrote in message
    >> news:...
    >> > Yep. but the method I describe involves catching the 404 with a custome
    >> > error page. this custom error page looks at the requested url which is
    >> > passed as a parameter and, for example, does a db lookup on
    >> > Dustmaster5000.
    >> >
    >> > the nice thing is that you can tailor the url "pseudo sub directories"

    > as
    >> > much as you want. Different languages for instance. Without actually
    >> > having to create the whole directory tree. also some search engines

    > attach
    >> > relevance to the URL components.
    >> >
    >> > I don't see how you can create a (maintainable) large website any other
    >> > way.
    >> >
    >> > dee wrote:
    >> >> Thanks KMA
    >> >> If user clicks on non-existing page url doesnt he get a 404 error?
    >> >>
    >> >> "KMA" <> wrote in message
    >> >> news:dfpqi2$dpj$-plus.net...
    >> >>
    >> >>>Precisely because it hides the URL. Imagine you have dynamically

    > created
    >> >>>pages. The URLs don't represent actual pages on your server. You
    >> >>>intercept
    >> >>>the request for a non-existant URL and return your dynamically created
    >> >>>page.
    >> >>>The browser still shows the expected URL, and not the URL of the page
    >> >>>that
    >> >>>actually did the work.
    >> >>>
    >> >>>eg User clicks on link

    >>
    >>>>www.myshop.com/household/electrical/cleaning/vacuum/Hoover/Dustmaster5000

    > .as
    >> >>>px
    >> >>>
    >> >>>which doesn't exists. Your code looks in the database for the product
    >> >>>details and sends back html. Users' browser still shows the fake URL.
    >> >>>
    >> >>>Another reasonto use transfer is to reduce round trips.
    >> >>>
    >> >>>
    >> >>>
    >> >>>"dee" <> wrote in message
    >> >>>news:...
    >> >>>
    >> >>>>Thanks Peter,
    >> >>>>What would be the advantage of using Transfer?
    >> >>>>
    >> >>>>"Peter Rilling" <> wrote in message
    >> >>>>news:...
    >> >>>>
    >> >>>>>Microsoft did not decide anything, it is just the behavior of the
    >> >>>
    >> >>>server.
    >> >>>
    >> >>>>>On a Redirect, a command is sent back to the browser and it is the
    >> >>>>>responsibility of the browser to redirect to the location. On a
    >> >>>
    >> >>>Transfer,
    >> >>>
    >> >>>>>no server-browser interaction happens. The server just simply

    > executes
    >> >>>>>different code, but the browser has no way of knowing that because
    >> >>>>>it
    >> >>>>>never receives any signal from the server. The browser does not
    >> >>>>>care
    >> >>>
    >> >>>what
    >> >>>
    >> >>>>>code executes on the server as long as it receives some HTML.
    >> >>>>>
    >> >>>>>This is one reason that I will not use Transfer (although it has its
    >> >>>>>purpose, but not very often).
    >> >>>>>
    >> >>>>>"dee" <> wrote in message
    >> >>>>>news:...
    >> >>>>>
    >> >>>>>>Hi,
    >> >>>>>>I'm curious why MS decided to have Transfer hide the target page's

    > url
    >> >>>>>>invisible?
    >> >>>>>>Any guesses ?
    >> >>>>>>Thanks.
    >> >>>>>>Dee.
    >> >>>>>>
    >> >>>>>
    >> >>>>>
    >> >>>>
    >> >>>
    >> >>

    >>

    >
    >
    dee, Sep 9, 2005
    #15
  16. dee

    Alan Silver Guest

    >This has nothing to do with Transfer. For this you would use
    >HttpHandlers (or whatever it is named).


    Actually, you don't needs those at all, you only need to use the
    UrlRewrite method. For some reason I've never worked out, this extremely
    simple and very useful technique is made horribly complex in almost
    every article and sample going by using handlers.

    As long as the fake URL ends in .aspx, it will be handed to ASP.NET for
    processing. You just add code to your global.asax to check for the fake
    URL and use UrlRewrite to call the real page. The browser still shows
    the fake URL.

    HTH

    --
    Alan Silver
    (anything added below this line is nothing to do with me)
    Alan Silver, Sep 15, 2005
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. avnrao
    Replies:
    1
    Views:
    7,197
    avnrao
    May 4, 2004
  2. Patrice
    Replies:
    0
    Views:
    869
    Patrice
    May 4, 2004
  3. Ben Fidge
    Replies:
    5
    Views:
    3,062
    Giorgio
    Feb 11, 2006
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,673
    Smokey Grindel
    Dec 2, 2006
  5. mohit
    Replies:
    0
    Views:
    520
    mohit
    Jan 23, 2008
Loading...

Share This Page