473,624 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response.Redire ct 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.Redire ct. 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 2752
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*******@disc ussions.microso ft.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.Redire ct. 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.r illing.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*******@disc ussions.microso ft.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.Redire ct. 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
14195
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
8423
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 for me :p ) Anyway I have a file dialog box being opened using Response.AddHeader "Content-Disposition", "attachment;filename=""" & displayName & """" Response.ContentType = "application/binary"
3
12969
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 build the PDF file and then I use a Response.Redirect("Exported\\crystal_report_name.pdf)"; command to redirect the page. However, the user wants the PDF file to open in a new window. Is there a way I can do this? It doesn't have to be...
3
818
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 is the code: If (sServiceCenter = "*ALL") Then sServiceCenter = "%"
3
3567
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 back, i have some olde invalid data in my window. and i realy need to open af new browser ? Thanks ODB
0
8246
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8685
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8631
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.