Passing Values and Server.Transfer

O

olduncleamos

Hello all.

With a background in ASP, I am finding the work required for passing
values between pages mystifying. For various obvious reasons, I have
eliminated using cookies and session to store state data. The only
ASP.NET options left is to use the Server.Transfer to transfer to page
2 from page 1, and then use the context to get whatever values in page
1 from page 2. I do find this indeed a very elegant solution as now I
can pass objects instead of plain text values.

But the problem is with the out of sync URL when using
Server.Transfer. I am scratching my head as to how anybody can not see
this as a problem. Not only the URL being display is not the same as
the page that you are seeing, it is also consistently one step behind
in a wizard-like sequential pages environment. Is it not confusing as
hell for the users?

Is there a better way to handle such a basic infrastructure problem
(passing values between pages), or am I just stuck in the old ASP
thinking?

Thanks in advance.
 
B

Brock Allen

But the problem is with the out of sync URL when using
Server.Transfer. I am scratching my head as to how anybody can not see
this as a problem. Not only the URL being display is not the same as
the page that you are seeing, it is also consistently one step behind
in a wizard-like sequential pages environment. Is it not confusing as
hell for the users?

Yeah, but the url showing is the url that the browser posted to. Server.Transfer
is all done server side and thus the browser really doesn't know that the
second page is the one that did the rendering. In ASP.NET 2.0 they've introduced
cross page postbacks which is the prefered way to accomplish what you're
doing. I posted about this, FWIW:

http://staff.develop.com/ballen/blog/PermaLink.aspx?guid=483742fd-01a2-4975-b76c-d3b8b4f29eaf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Incrementing Values 1
Server.Transfer 1
server.transfer and context handler 0
server.transfer 4
Server.Transfer and passing values 2
Server.Transfer 2
Server.Transfer 1
passing values through url 6

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top