473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

window.open() in HTTP Response/Request?

Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin
Nov 18 '05 #1
5 2264
Perhaps the easiest way to accomplish this is through the
Page.RegisterStartupScript() or one of the similar methods. The MSDN
documentation provides an example.

http://msdn.microsoft.com/library/de...criptTopic.asp

"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #2
Try this code:
RegisterStartupScript("startupScript", "<script
language=JavaScript>window.open('test.aspx','_blan k');</script>")

Here's more info:
http://msdn.microsoft.com/library/de...criptTopic.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #3
Hi

Thanks for your replies.

I had this solution before but the architcture (not functionality) doesn't
work for me.
Is there any way I can do it the way I asked for, no matter how complicated?

I mean there must be a solution to do this using Response/Request?

Thanks for your efforts!

Martin
"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #4
What is it in your architecture that is preventing this solution from
working? Response.Redirect is a server side action that instructs the
client to send another GET request to the server. Opening a new window is a
client side action and therefore cannot be controlled from the server.

"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi

Thanks for your replies.

I had this solution before but the architcture (not functionality) doesn't
work for me.
Is there any way I can do it the way I asked for, no matter how complicated?
I mean there must be a solution to do this using Response/Request?

Thanks for your efforts!

Martin
"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin


Nov 18 '05 #5
Thank you to everyone for replying. It's solved. See next post about hta.

"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
12
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
10
by: Roland | last post by:
Hello, the example code is the following(the number in parentheses at the beginning are just for reference)(The complete HTML file is at the end of this article): (1)window.location =...
4
by: Max Dupenois | last post by:
I've seen numerous articles with similair (similar sp?) titles to this in my search.. unfortunately none of them seem to contain what i want, (or if they do i need someone to point out my stupidity...
8
by: Andy G | last post by:
I have an application that once you login it creates a new window using script (see below). This window is the window the client needs to use to do their work (don't ask why we need a window to...
11
by: Josh | last post by:
Hi, Anyone know how to open a New Browser window and then "response.write" to the new window. I know how to open a new window, but then targeting response.write at it is a mystery. I need...
1
by: Suedois | last post by:
Hi, I use a Crystal Report Viewer to export a report in PDF. This is done by a code behind procedure like this: private void ExportReport() { MemoryStream oStream = new MemoryStream() ;...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
6
by: SAL | last post by:
Hi, VS2005 post I'm opening a window using the following syntax: Protected Sub lbEstValue_Click(ByVal sender As Object, ByVal e As System.EventArgs)...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.