Server.Transfer with url change

G

Guest

Hi;

I would like to do the equivilent of a Server.Transfer() so I can pass data
along in the context. But I want the new url to show like a
Response.Redirect() - but that loses the data I stuffed in Context.

What I need is a way to a) have the url of the page redirected to show up,
b) pass data to the redirected page, and c) have the passed data go away once
the new page is up. I don't want to use Session because if for some reason it
does not get to the second page, that data is left connected to the Session.
 
B

bruce barker \(sqlwork.com\)

the url in the browser winow, is the url of the last request. if you do a
server transfer, all you are doing is calling different backend code to
process the request, not changing the request. there is no way to change the
url in the browser without doing a request to that url (think of the
security problems if you could).

so the only way for the server to change the url in the browser is with a
redirect.

what you shoudl do is tie the data to ticket, and pass the ticket in the url
string in the redirect. the ticket should only be good for one fetch and
should have a timeout. session should be fine for this.


-- bruce (sqlwork.com)
 
G

Guest

E.g
TextBox txt=(TextBox) PreviousPage.FindControl("txtname");
with this way you can access the data which store previous page.
 
Joined
Dec 20, 2008
Messages
1
Reaction score
0
That procedure only works with Server.Transfer. Redirect drops all content, so the only option is to use POST or GET variables.
 

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

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top