One of my developers was trying to post back from one ASPX page to another and was struggling to retain the values in the second ASPX page. What has was doing is from Default.Aspx page he had a Save button and when the button was clicked he transferred the user to Process.Aspx page using Server.Transfer.
Even though everything looks perfect the values are not being passed back. Finally he came to me and I saw the code and everything was perfect. Then the other developer started exploring the Server.Transfer method and luckily the Server.Transfer method had a overload that accepted a Boolean to preserve the state (MSDN).
Therefore we fixed the problem by using the overload.
Server.Transfer(Process.Aspx,true);
Interesting solution…
I've moved back to India from
Chicago and joined
Thomson Financials at
Bangalore, India as
Technical Lead.