Server.Transfer problem. Need help!

Results 1 to 3 of 3

Thread: Server.Transfer problem. Need help!

  1. #1
    Join Date
    Dec 1969

    Default Server.Transfer problem. Need help!

    I have an ASP.Net app that passes values between pages. Because of this, I used Server.Transfer to switch between pages instead of Response.Redirect. However, it was found that some page transfers would not work using Transfer, so we switched to Redirect only in those cases (where no data had to be transfered). <BR><BR>At this point, we have a combination of Transfers and Redirects. We almost have it working except one page will hang when you try to return to the homepage. You wind up with a blank page containing the previous page&#039;s URL in the browser address line.<BR><BR>The app requirements state that it must run in a stateless environment.<BR><BR>Does anyone have a solution?

  2. #2
    Join Date
    Dec 1969

    Default RE: Server.Transfer problem. Need help!

    well, you can combine some of your sets of pages into single pages that contain html blocks that you mark with the visible property. and you can take the code for the html blocks and put it into ascx files with their own code-behind so that the newly combined aspx files do not need to be as large.<BR><BR>i am suggesting this because i am assuming that pages that share data are related to each other, like the various screens in a multi-screen form. in the case of a multi-screen form, you can make each screen a user control and pass the data and visibility between controls without having to use multiple aspx files. this might solve your problem<BR><BR>also, if you can explore the logic behind your requirement that the app be stateless, perhaps the requirement can be redefined as simply not using cookies? if you can get away with cookieless state management, can maintain state by putting the session id in the url automatically when each user visits your site. it is cookieless. and server.transfer is state-management anyway, so i dont think there is much difference between server.transfer and cookieless session management. you are already breaking your no-state rule by using server.transfer<BR><BR>does this help? if so, i would appreciate some help with my currently open problem. you can read it at:<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Server.Transfer should always work

    However, I have found that it will generate eroneous thread aborted errors in methods that have code "anywhere" after the Server.Transfer. If you step through the code in debug mode, you&#039;ll see this occurring.<BR><BR>My guess is that if you carefully review you methods to ensure that Server.Transfer is the last execute line of code, your problems will likely be gone. Putting a return; statement after the Server.Transfer is also helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts