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

Creating new window in Webpage

Is there a way to create a new window in a Web browser using the Response.
Redirect command? Many times I want to create a new window but am unable
with the Response.Redirect command. I can do it with a Javascript but I want
to be able to pass some dynamic parameters which I cannot do in Javascript.
Any help will be appreciated.

Aug 12 '06 #1
5 871
Response.redirect does nothing more than tell the browser to load a new URL
address, so you cannot open a new window with it.

Regards

John Timney (MVP)

"Parrot" <Pa****@discussions.microsoft.comwrote in message
news:33**********************************@microsof t.com...
Is there a way to create a new window in a Web browser using the Response.
Redirect command? Many times I want to create a new window but am unable
with the Response.Redirect command. I can do it with a Javascript but I
want
to be able to pass some dynamic parameters which I cannot do in
Javascript.
Any help will be appreciated.

Aug 12 '06 #2

John;
Thanks for your reply. I assume then that Javascript is the only way to
open a new window using C# in ASP.NET.

"John Timney (MVP)" wrote:
Response.redirect does nothing more than tell the browser to load a new URL
address, so you cannot open a new window with it.

Regards

John Timney (MVP)

"Parrot" <Pa****@discussions.microsoft.comwrote in message
news:33**********************************@microsof t.com...
Is there a way to create a new window in a Web browser using the Response.
Redirect command? Many times I want to create a new window but am unable
with the Response.Redirect command. I can do it with a Javascript but I
want
to be able to pass some dynamic parameters which I cannot do in
Javascript.
Any help will be appreciated.


Aug 12 '06 #3
......you are correct.

Regards

John Timney (MVP)
"Parrot" <Pa****@discussions.microsoft.comwrote in message
news:97**********************************@microsof t.com...
>
John;
Thanks for your reply. I assume then that Javascript is the only way to
open a new window using C# in ASP.NET.

"John Timney (MVP)" wrote:
>Response.redirect does nothing more than tell the browser to load a new
URL
address, so you cannot open a new window with it.

Regards

John Timney (MVP)

"Parrot" <Pa****@discussions.microsoft.comwrote in message
news:33**********************************@microso ft.com...
Is there a way to create a new window in a Web browser using the
Response.
Redirect command? Many times I want to create a new window but am
unable
with the Response.Redirect command. I can do it with a Javascript but
I
want
to be able to pass some dynamic parameters which I cannot do in
Javascript.
Any help will be appreciated.



Aug 12 '06 #4
Dear Parrot,

http://www.codersource.net/published...uently_asked_q
uestions.aspx

this.Button1.Attributes.Add("onclick","window.open ('http://www.yahoo.com
')");

hope tht solves it !

Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Aug 12 '06 #5
Dave;
Thank you so much for your help. I made the changes you suggested and it
worked! I needed to make the url command dynamic so I created the code as
shown below which allows me to pass a different url to the button command
each time it is clicked.

string url = "http://www.minonktalk.com"; // This can be a dynamic
variable
string command = "window.open('" + url + "')";
this.Button1.Attributes.Add("onclick", command);

"Dave Johnson" wrote:
Dear Parrot,

http://www.codersource.net/published...uently_asked_q
uestions.aspx

this.Button1.Attributes.Add("onclick","window.open ('http://www.yahoo.com
')");

hope tht solves it !

Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Aug 15 '06 #6

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

Similar topics

2
by: PK | last post by:
Hello, I am looking for help on the following. I'm trying to create a custom browser toolbar button that will do a few things. One that I'm trying to do at the moment is just simply return the...
4
by: Harish Mohanbabu | last post by:
Hi, How to create an instance of Internet Explorer from classic ASP? I want to create an instance of IE and then subsequently load a webpage through this object. I am aware of creating web...
2
by: Dom Nicholas | last post by:
Hi, My question is this : how do I detect from another window which didn't create a new window whether it exists ? For example, is there a window-id's container of some sort that hangs around...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
1
by: Simon Wigzell | last post by:
I have a picture gallery webpage. Naturally I want as much space as possible for the pictures but with browsers these days the actual available area is only 2/3 - 3/4 of the total window. So I have...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
5
by: wreed06 | last post by:
I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully validated my HTML...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
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
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,...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.