473,326 Members | 2,113 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,326 software developers and data experts.

Response.Redirect vs Window.Open

James suggested that I used window.open on the client side
to open a new window. I created a test ASP app and can
get it work fine. But now I'm trying to fix my real app,
which is in ASP.NET. It uses a button with the button
handler in the C# code-behind page calling
Response.Redirect. I can't find anything that's
equivalent to window.open and I don't know enough about
ASP to figure out how or where to put the window.open and
still run all the other stuff that's happening in my click
handler. If I knew what to look up or what class it lives
in I can probably find it in the docs. Can somebody point
me in the right direction?

Thanks
Nov 22 '05 #1
2 2724
ASP.NET cannot control the browser's behavior. All it is responsible for is
fabricating the HTML used to render. If you want some action done on the
browser, such as opening a new window, you will need to send that script
down to the client for execution.

"margaret" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
James suggested that I used window.open on the client side
to open a new window. I created a test ASP app and can
get it work fine. But now I'm trying to fix my real app,
which is in ASP.NET. It uses a button with the button
handler in the C# code-behind page calling
Response.Redirect. I can't find anything that's
equivalent to window.open and I don't know enough about
ASP to figure out how or where to put the window.open and
still run all the other stuff that's happening in my click
handler. If I knew what to look up or what class it lives
in I can probably find it in the docs. Can somebody point
me in the right direction?

Thanks

Nov 22 '05 #2
1. Turn off runat=server on the button. You may need to change it from
an <asp: control to a normal web control <button??

2. In the onclick event of the new control, have it do a window.open
using the properties you would like, and using the page that you
wanted to redirect to as the URL. That page can, of course, be an aspx
file as well.

On Wed, 17 Dec 2003 12:28:03 -0800, "Peter Rilling"
<pe***@nospam.rilling.net> wrote:
ASP.NET cannot control the browser's behavior. All it is responsible for is
fabricating the HTML used to render. If you want some action done on the
browser, such as opening a new window, you will need to send that script
down to the client for execution.

"margaret" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
James suggested that I used window.open on the client side
to open a new window. I created a test ASP app and can
get it work fine. But now I'm trying to fix my real app,
which is in ASP.NET. It uses a button with the button
handler in the C# code-behind page calling
Response.Redirect. I can't find anything that's
equivalent to window.open and I don't know enough about
ASP to figure out how or where to put the window.open and
still run all the other stuff that's happening in my click
handler. If I knew what to look up or what class it lives
in I can probably find it in the docs. Can somebody point
me in the right direction?

Thanks


Nov 22 '05 #3

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

Similar topics

5
by: Hugh Welford | last post by:
Hi, is it possible to open a page in a new window with response.redirect, and if so, what is the syntax Thanks Hugh
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...
3
by: eieed | last post by:
I have a web page that is designed to allow users to run crystal reports which are then exported into PDF formats. Currently, when the user clicks the "Submit" button there is some processing to...
3
by: Sehboo | last post by:
On my ASP page, when I click a button, I want to do three things: 1. Check for some values. 2. Open a new window and pass some values as query string. 3. Redirect to some other page Here...
3
by: ODB | last post by:
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.