Click here to Skip to main content
15,609,235 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Presently in my application,server.tranfer is being used to go from page1 to page 2.

Page 2 use Previouspage to get some values frm page1.

Now after opening the page2 in new IE window,the Prevouspage values are null and throws error msg of "Object reference not set to an instance of an object".

Any help or pointer will be good for me.


1 solution

Server.Transfer occurs on the server only, perhaps you need to use Response.Redirect ?

Either way, this looks like such an ugly hack to me. First of all, NEVER assume that any code like calls to FindControl will return what you want, always check for null. That's just basic coding 101. Second, pass values on the URL instead of doing this.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900