473,503 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Window Open Server Side

Hi,

How do I open a new window in a button click event (server-side)?

I need to open it from this event because once the user has click the
button, the event handler does some processing and creates a query
string.

If I didn't need the query string it wouldn't be a problem - I would
just use javascript client-side.

e.g.

Private Sub PreviewButton_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles PreviewButton.Click

-process data

-create query string

-open new page with query string

End Sub

I have tried adding this:
PreviewButton.Attributes.Add("onclick",
"window.open('somedoc.html','somename',
'width=150,height=150,resizable=1)")

and this:

Response.Write("<script
language=javascript>window.open('somedoc.html',' new')</script>")

without luck!

Thanks,
Jack
Nov 19 '05 #1
1 1732
This article shows how to use javascript in your pages, including
window.open.
http://SteveOrr.net/articles/clientsidesuite.aspx

Here's more info:
http://msdn.microsoft.com/workshop/a...ods/open_0.asp

Some popup blockers may foil your plans however, so consider alternate
designs.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Jack" <ja****@humlog.com> wrote in message
news:6e**************************@posting.google.c om...
Hi,

How do I open a new window in a button click event (server-side)?

I need to open it from this event because once the user has click the
button, the event handler does some processing and creates a query
string.

If I didn't need the query string it wouldn't be a problem - I would
just use javascript client-side.

e.g.

Private Sub PreviewButton_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles PreviewButton.Click

-process data

-create query string

-open new page with query string

End Sub

I have tried adding this:
PreviewButton.Attributes.Add("onclick",
"window.open('somedoc.html','somename',
'width=150,height=150,resizable=1)")

and this:

Response.Write("<script
language=javascript>window.open('somedoc.html',' new')</script>")

without luck!

Thanks,
Jack

Nov 19 '05 #2

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

Similar topics

13
9396
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
12
12394
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,...
31
2806
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page...
4
22156
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
8
4341
by: Dan | last post by:
hello all, is there a way to open a new window without javascript and a href=_blank? i need to connect a button click with some lines of code and then, a new window shall get opened. but i didn't...
6
21390
by: shil | last post by:
I have a server side button that needs to do some preperation and afterwards, if everything goes well, open a new browser with a specific url. I know how to execute javascript from a server side...
6
1830
by: Charlie Garrett-Jones | last post by:
i have a server side generated web application that provides parameter forms and always opens the associated reports in a new browser window. the code that controls the opening of the new browser...
4
443
by: Guy Cohen | last post by:
Hi all How do I show an existing aspx page to the user? I need an equivalent command to java's window.open in ASP.NET TIA Guy
6
12063
by: bushi | last post by:
hi everyone! i have diplayed my hyperlinks in a iframe.when i redirect to next page.the next page also open in the same frame,but i want to open a new browser window,when i click on the...
2
8469
by: H. Rodriguez | last post by:
Hello, I would like to be able to open a new IE window on the client side and display a PDF document in the new window. Many tutorial sites that I have checked suggest opening a new IE window...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6984
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
7453
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...
1
5005
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
4670
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...
0
3162
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...
0
1507
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 ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.