Response.Redirect can it open a new window ???

O

ODB

Okay what i need is to open af new browser windows with some link in, but i
can't get the Response.Redirect to open af new window, and when i redirect
to a new page in the same window and then hit back, i have some olde
invalid data in my window. and i realy need to open af new browser ?

Thanks ODB
 
R

Rick Strahl [MVP]

Any Response operation always goes back to the same window unless you
specify a target clause in the link that got you to the current request.
IOW, the referring link determines how the current link will be opened.

If you really need to do this you can redriect to a page that has some
JavaScript on it and opens a new window and loads the content into that.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/blog/
 
V

vMike

Here is an example of how it can be done in your code so that you can
control it.

dim strurl as string = "http://www.yahoo.com"

dim strCommand as string = "vlarge1=window.open('" & strurl &
"','vlarge','resizable=no,scrollbars=no,status=no,toolbar=no,height=450,widt
h=575,left=150,top=100');vlarge1.focus();" & vbCrLf

dim strCommand as string = "window.open('" & strurl & "','','');" & vbCrLf

response.write("<script>" & vbCrLf)
response.write(strCommand & vbCrLf)
response.write("<" & chr(47) & "script>")
response.redirect(strUrl)
 
V

vMike

Sorry my post should read

Here is an example of how it can be done in your code so that you can
control it.

dim strurl as string = "http://www.yahoo.com"

dim strCommand as string = "vlarge1=window.open('" & strurl &
"','vlarge','resizable=no,scrollbars=no,status=no,toolbar=no,height=450,widt
h=575,left=150,top=100');vlarge1.focus();" & vbCrLf

or you can use if you don't want to size it
dim strCommand as string = "window.open('" & strurl & "','','');" & vbCrLf

response.write("<script>" & vbCrLf)
response.write(strCommand & vbCrLf)
response.write("<" & chr(47) & "script>")

don't put this line in
'response.redirect(strUrl)
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top