468,457 Members | 1,763 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

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

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?

Jun 21 '07 #1
3 1333
Have you debugged to make sure your Response.Redirect line is actually
executing?
A common alternate to Response.Redirect is Server.Transfer. Here's more
info:
http://SteveOrr.net/faq/TransferRedirect.aspx

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

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Doogie" <dn******@dtgnet.comwrote in message
news:11**********************@u2g2000hsc.googlegro ups.com...
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?
Jun 21 '07 #2
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!

Jun 22 '07 #3
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.

Jun 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Hugh Welford | last post: by
3 posts views Thread by Sehboo | last post: by
5 posts views Thread by Doug | last post: by
3 posts views Thread by =?Utf-8?B?c3VyZXNocGFuZGk=?= | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by subhajit12345 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.