Using Response.Redirect to open a new page is not working

D

Doogie

In the code below, I am trying to go from one asp page to another:

For Each tripToAccept As String In tripsToAccept.Split("/"c)
dataManager.UpdateTripDetail("Accept", CInt(tripToAccept),
Hiduser.Value)
Next


Response.Redirect("TripAcceptReject.aspx", False)


I am not getting an error, but I'm also not seeing anything happen at
all. This is an existing app and it looks like the page I'm trying to
open up is a modal page, could that be an issue. Is there another way
to open up one asp page from another?
 
D

Doogie

Have you debugged to make sure your Response.Redirect line is actually
executing?

Hi Steve, yes I verified it is executing. Just nothing appears to be
happening.
A common alternate to Response.Redirect is Server.Transfer. Here's more
info:http://SteveOrr.net/faq/TransferRedirect.aspx

Interestingly enough, I tried to use Server.Transfer but I kept
getting errors. I was going to retry it this morning so I could send
you what error I got and lo and behold it's working. Sheesh. :)
If you're trying to pop open a whole new window then this link would likely
be more helpful:http://SteveOrr.net/articles/ClientSideSuite.aspx

This looked very interesting...if I run into any further issues with
Server.Transfer, I'll give this a try.

Thank you for your help!
 
D

Doogie

Interestingly enough, I tried to use Server.Transfer but I kept
getting errors. I was going to retry it this morning so I could send
you what error I got and lo and behold it's working. Sheesh. :)

Well I was wrong. It goes through the Page_Load method of this other
page but then jumps back to the original page and throws a threading
exception (regardless of whether I use true or false for the preserve
form parameter). But it does still open the page, only it opens it in
the same window as the previous page (which is not what I wanted).
I'll have to look at your window open code you mentioned in your
article and see if I can get that to work.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top