Doug said:
I'm not doing anything later on. There's no more code after this.
It should go directly to the TripAcceptReject page, but it doesn't.
There doesn't have to be any code that you have written after that to
interfer with the process. The page creation process continues,
rendering the controls that you have in the page into an html page that
is sent to the browser.
If you don't want that to happen, you have to make sure that there are
no controls in the page so that the rendering doesn't produce any
output. Then it might work.
I tried that, but I kept getting a threading error. Per a previous
post, someone told me to use false for that parameter to avoid the
error and then this is what happens.
The Response.Redirect method uses an exception to end the execution of
the current page. This is normal, and if you want it to work normally,
you should not catch this exception.
Using the second parameter does prevent the exception to be thrown, but
if you want to do it that way, you have to deal with the rest of the
page creation process.
I did try using Server.Transfer and that appears to work but after it
executes the code in the redirected page, it jumps back to the calling
page, throws that Threading exception, but still displays the
TripAcceptReject page, but within the same window.
It's not jumping back to the page. It's rendering the page because the
first page added it's controls to the page tree, and the second page
also added it's controls to the page tree, and is rendering all of it
into a single html page.
I want it to
display as a seperate window (I believe it currently is doing this as
a modal window, but the way it was called before is through
Javascript, I'm now in server side code (VB) and need to do it there.
I can't believe that it is that hard to do a simple redirect to a
window!!!!
)
If you want to display it as a separate window, you can't use server
code to accomplish it. A new window can only be opened from the browser,
so you have to either use a link with target="_blank" or the window.open
method in Javascript.