473,386 Members | 1,708 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,386 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 2732
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.