473,326 Members | 2,061 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.

Open Page

Wes
This should be really simple ... but how to do it has been
eluding me ...

I am writing an ASP.NET application and am using
ASP.ImageButtons & ASP.Buttons. Instead of redirecting to
another page (ie. Response.Redirect("xxx.htm")) I want to
open the page in another window. Sounds pretty basic,
but .....

If you can help, I'd sure appreciate it.

Thanks,

Wes
Jul 19 '05 #1
1 3181
You should use an html image link instead of an asp.net
control if you are just redirecting to a new page. It is
less weight. Opening a new browser is done on the client-
side so the only way you could get an asp.net control to
open a new page is to dynamically write javascript to the
page to open a new window when the button was clicked. (I
think)

Anyways here is some javascript code and how you would
call it in a page to open an new window.

Javascript code:
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height -
h) /2;winprops='height='+h+',width='+w+',top='+wint+', left
='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
// <li><a
href="../Conferences/2002_National_Conference/index1.asp">2
002 CSEPP National Conference</a> June 26-27, 2002, in
Lexington, Kentucky
if (parseInt(navigator.appVersion) >= 4) { win.window.focus
(); }
}
// End -->

HTML IMAGE LINK TO PUT IN YOUR PAGE(can be in .net html
page)
NOTE: The window name parameter cannot contain spaces.

<A onmouseover="document['ImgUsage'].src
='MouseOverImage.gif" onmouseout="document
['ImgUsage'].src='NormalImage.gif'" onclick="NewWindow
(this.href,'WindowName','740','530','yes');return false;"
href="usage_policy.asp" >
Hope this helps
-----Original Message-----
This should be really simple ... but how to do it has beeneluding me ...

I am writing an ASP.NET application and am using
ASP.ImageButtons & ASP.Buttons. Instead of redirecting toanother page (ie. Response.Redirect("xxx.htm")) I want to
open the page in another window. Sounds pretty basic,
but .....

If you can help, I'd sure appreciate it.

Thanks,

Wes
.

Jul 19 '05 #2

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

Similar topics

0
by: Unigroup of New York | last post by:
Content-Type: multipart/mixed; boundary="------------C465DF38DCB38DD2AF7117E0" Lines: 327 Date: Tue, 15 Feb 2005 23:36:38 -0500 NNTP-Posting-Host: 24.46.113.251 X-Complaints-To: abuse@cv.net...
18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
6
by: lukeo | last post by:
I'm shelling out to an .asp (or htm) page from an application. I want to show this in a window without the address bar, etc... Is there a way I can redirect this page using javascript to a page...
4
by: Dan Cruz | last post by:
Below are two files: Main.asp and Help.asp. I've stripped it down to the 'barest-of bones' so that anyone willing to help can duplicate the problem on their own systems. ***Main.asp*** looks...
3
by: ACaunter | last post by:
Hi all, I need to set a session variable and open a new window with a single click of an asp.net button. My problem is that it always takes two clicks.. one sets the session and the other opens...
6
by: Jack | last post by:
I have a main webpage that has a list of records, each with a link to a window.open function call. As an example, a page that opens is editrecord.aspx?RecordID=34, and another is...
18
by: len.hartley | last post by:
Hi, I am trying to pop-up a window when the user clicks on an image. The problem is that when the user clicks on the image and the window pops up OK, but the window underneath also proceeds to...
11
by: Dave | last post by:
For some reason, the below lines only work on select machines. All machines are running IE6. IE SP's and OS's vary. When it doesn't work, default.aspx (the page that this code is in) opens and...
6
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...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
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...
0
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...
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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.