server.transfer gives error but response.redirect works.

  • Thread starter Thread starter archana
  • Start date Start date
A

archana

Hi all,

I am new to asp.net. I am trying to use server.transfer and
respnse.redirect.

When i nagivate to page using server.transfer on navigated page if i
click on refresh i am getting error. But this is not happening when i
use response.redirect.

On msdn i read thaat i may get unexpected result in server.transfer.
Can anyone tell me why is it so?

any help will be truely appreciated.

thanks in advance.
 
What error are you getting? Just to highlight: Server.Transfer() displays
content from the transferred page but the URL on the browser remains the old
one and so refreshing the page actually reloads the previous (old) page.
 
When you use Server.Transfer, the browser is never informed that the page
has changed.
Therefore when you tell the browser to refresh, it is requesting the
original page. This is likely at the root of your problem.
 
Back
Top