473,399 Members | 3,302 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,399 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 3186
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
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...
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...

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.