Server.Transfer Question

M

Mark A. Deal

Can anybody explain why the following does not work?

If Session("ReferredBy") <> "" Then
Server.Transfer(Session("ReferredBy"))
Else
Server.Transfer("Property.aspx")
End If

I am trying to open PageA and if a session ID has not been set then it
re-directs to PageB. When the sessionID has been set then I want to bring
the user back to PageA

TIA
--
Mark A. Deal
Document & Data Solutions, LLC
http://www.docsol.com
Time Matters AIC
HotDocs Certified Consultant
GhostFill Certified Consultant
 
M

Mark A. Deal

If Session("ReferredBy") <> "" Then
Server.Transfer(Session("ReferredBy"))
Else
Server.Transfer("Property.aspx")
End If

I don't get an error, I just cannot get it to redirect and it is driving me
nuts! It simply performs a postback to the form where this code is
contained. Neither of the forms is redirected to.

Any help is certainly appreciated.

--
Mark A. Deal
Document & Data Solutions, LLC
http://www.docsol.com
Time Matters AIC
HotDocs Certified Consultant
GhostFill Certified Consultant
 
M

Mythran

Mark A. Deal said:
If Session("ReferredBy") <> "" Then
Server.Transfer(Session("ReferredBy"))
Else
Server.Transfer("Property.aspx")
End If

I don't get an error, I just cannot get it to redirect and it is driving
me
nuts! It simply performs a postback to the form where this code is
contained. Neither of the forms is redirected to.

Any help is certainly appreciated.

--
Mark A. Deal
Document & Data Solutions, LLC
http://www.docsol.com
Time Matters AIC
HotDocs Certified Consultant
GhostFill Certified Consultant

What event handler is this code inside of? Please post more code...anywho,
you might want to check the event handler for a Handles clause.

Mythran
 

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

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top