locked
HttpModule to reflect the newly requested url in a Server.Transfer op RRS feed

  • Question

  • User-290742676 posted

    Is it possible to write a custom HttpModule that will correct the "Address" bar of the client to reflect the new page once a Server.Transfer is issued?  I heard that it's possible...but not sure since the client never knows anything about the second request.  I'm thinking a Url Rewrite is the answer...but I don't know how to determine (in my HttpModule) the name of the page that's being transferred to.

    Thanks for your help,
    Mark

    Monday, August 15, 2005 3:28 PM

All replies

  • User1392434580 posted
    If you use a Response.Redirect the address bar will be updated.  Response Redirect sends a 302 browser redirect, so there is interaction between the browser and the server.  Server.Transfer stays inside of the server so the browser never knows its actually a different page/resource. 

    hth,
    Thursday, August 18, 2005 4:48 PM
  • User-290742676 posted

    Thanks Scott.

    Yah, I'm familiar with the differences between Redirect and Transfer.  I was wanting to use Transfer to eliminate a round trip and more importantly, to have the ability to get at the called object (to read properties and such) using a context handler.

    I wasn't sure if there was a way to change the url (when the page finally reaches the client) using a custom httpmodule or httphandler (on the server).  I've heard there is a way to do it...although I'm not sure how one would go about it given the seperation of the client and server using a Transfer.

    Thanks again,
    Mark

    Wednesday, August 24, 2005 10:05 AM