473,698 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ImageButton s & ASP.Buttons. Instead of redirecting to
another page (ie. Response.Redire ct("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 3212
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(mypag e, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height -
h) /2;winprops='hei ght='+h+',width ='+w+',top='+wi nt+',left
='+winl+',scrol lbars='+scroll+ ',resizable'
win = window.open(myp age, myname, winprops)
// <li><a
href="../Conferences/2002_National_C onference/index1.asp">2
002 CSEPP National Conference</a> June 26-27, 2002, in
Lexington, Kentucky
if (parseInt(navig ator.appVersion ) >= 4) { win.window.focu s
(); }
}
// 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="do cument['ImgUsage'].src
='MouseOverImag e.gif" onmouseout="doc ument
['ImgUsage'].src='NormalIma ge.gif'" onclick="NewWin dow
(this.href,'Win dowName','740', '530','yes');re turn false;"
href="usage_pol icy.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.ImageButto ns & ASP.Buttons. Instead of redirecting toanother page (ie. Response.Redire ct("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
2121
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 X-Trace: fe12.lga 1108528794 24.46.113.251 (Tue, 15 Feb 2005 21:39:54 MST) NNTP-Posting-Date: Tue, 15 Feb 2005 21:39:54 MST Xref: number1.nntp.dca.giganews.com comp.lang.python:398656
18
8841
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 (same folder). The cookie is not received. Can someone explain why? I worked around this by adding a cache-control header with a value of no-cache. This fixes the problem. Unfortunately that causes another problem with Internet Explorer...
6
12170
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 where I can set the window height, statusbar=no, etc? Thanks, -Luke
4
2199
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 like so: <HTML> <HEAD> <TITLE>Main</TITLE>
3
2368
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 the window... if i write the open window code in the page load, then the window gets open on 1 click and no session variable was saved... any ideas how to get around this... this is my code:
6
34269
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 editrecord.aspx?RecordID=52. If the user starts changing the contents of the opened window, and then leaves it open and goes back to the main page, refreshes the list, and clicks on the same record link again, it reloads the contents of the page the user had...
18
3335
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 the image. The desired behavior is that when the pop-up is invoked, I want the underlying window to stay put. I don't have this problem when I run the code on my local computer but I do have it when I run the code on geocities.
11
4937
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 closes. That's all you see. TSReminder.aspx doesn't even open. I'm not sure what's going on here. Response.Write("<script...
6
12073
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 link.actually i 'm using link button control to diplay the hyperlinks.i cant use java script "window.open()".i need some server side code behind the linkbutton,if any one knows plz rply soon.
7
4010
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(); Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
0
8603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9026
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
8893
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
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
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
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
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
2
2328
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.