S
Stephen Witter
I am currently using response.redirect in a aspx to go to a web page.
What I want is to open the page in a new window. My dotnet code is as
follows:
Dim sFileName as string = "/TempReports/tempReport.pdf"
response.redirect(sFileName)
This opens in the same frame and I want to use something like
window.open so I can force a new page and control the size of the
window, etc.... One thing I thought about is calling a javascript
function from within a linkbutton. I don't want to use the
attributes.add because the link button already has code.
I have tried:
Dim scriptString As String = "<script language='javascript'>
{window.open(" & sFileName & ");} </script>"
Response.Write(scriptString)
but the "<script language=javascript></script>" doesn't come across as
a string in my code, it actually comes across as an actual script tag
even though it is in quotes.
I have tried:
Response.Write("<META HTTP-EQUIV=""REFRESH"" Content=""0;URL=" &
sFileName & """ target=""_blank"">")
to at least get it to open in a new window but I can't get it to work.
Even though I have the target=""_blank"" it still opens in the same
frame.
Any suggestions?
What I want is to open the page in a new window. My dotnet code is as
follows:
Dim sFileName as string = "/TempReports/tempReport.pdf"
response.redirect(sFileName)
This opens in the same frame and I want to use something like
window.open so I can force a new page and control the size of the
window, etc.... One thing I thought about is calling a javascript
function from within a linkbutton. I don't want to use the
attributes.add because the link button already has code.
I have tried:
Dim scriptString As String = "<script language='javascript'>
{window.open(" & sFileName & ");} </script>"
Response.Write(scriptString)
but the "<script language=javascript></script>" doesn't come across as
a string in my code, it actually comes across as an actual script tag
even though it is in quotes.
I have tried:
Response.Write("<META HTTP-EQUIV=""REFRESH"" Content=""0;URL=" &
sFileName & """ target=""_blank"">")
to at least get it to open in a new window but I can't get it to work.
Even though I have the target=""_blank"" it still opens in the same
frame.
Any suggestions?