Does anyone have any ideas how to open a new web browser
window in .NET?
I'm using ASP.NET with VB as the code behind, and after
some (server side) validation code may need to open a
second browser window.
Any help gratefully received.
Cheers
Stu. 10 1914
You do just like you would in HTML: put a client-side script with a
windows.open(.. .) command.
ASP.Net doesn't provide you with anything new on that side.
--
To reply, remove a "l" before the @ sign.
Arnaud Weil - MCT, MCSD.Net, MCAD.Net
In your codebehind after the validation write the
javascript to open the window to a literal control.
litScript.Text = "<script
type=""text/javascript"">wi ndow.open('some page.aspx');
</script>" -----Original Message----- Does anyone have any ideas how to open a new web browser window in .NET?
I'm using ASP.NET with VB as the code behind, and after some (server side) validation code may need to open a second browser window.
Any help gratefully received.
Cheers Stu.
.
Hi,
Thanks for the reply.
I already knew of the windows.open() command, but I don't
know of a way that I can invoke this from my VB code.
Is there a way to invoke the java script from the VB
server side code?
Cheers
Stu. -----Original Message----- You do just like you would in HTML: put a client-side
script with awindows.open(. ..) command.
ASP.Net doesn't provide you with anything new on that
side.-- To reply, remove a "l" before the @ sign.
Arnaud Weil - MCT, MCSD.Net, MCAD.Net
.
> I already knew of the windows.open() command, but I don't know of a way that I can invoke this from my VB code.
Is there a way to invoke the java script from the VB server side code?
In your CodeBehind, write:
RegisterClientS criptBlock("<sc ript>window.ope n(...)</script>");
--
To reply, remove a "l" before the @ sign.
Arnaud Weil - MCT, MCSD.Net, MCAD.Net
Thanks, that is exactly the kind of functionality I was
looking for.
With a bit of thought I can now achieve my goal.
Cheers
Stu. -----Original Message----- In your codebehind after the validation write the javascript to open the window to a literal control.
litScript.Te xt = "<script type=""text/javascript"">wi ndow.open('some page.aspx'); </script>"
-----Original Message----- Does anyone have any ideas how to open a new web browser window in .NET?
I'm using ASP.NET with VB as the code behind, and after some (server side) validation code may need to open a second browser window.
Any help gratefully received.
Cheers Stu.
. .
Hi Stuart,
An ASP.Net application is just HTML on the client side. Therefore, the way
to open a new browser window is still the same. You can do it either by
using the "target" attribute of a hyperlink or form, or you can use
JavaScript's window.open() method to do so. In either case, it has to be
done on the client browser, not on the server (other than, for example,
using Page.RegisterSt artupScript() to add your JavaScript to the page).
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Big Things are made up of
Lots of Little Things.
"Stuart Brierley" <br************ *@hotmail.com> wrote in message
news:0d******** *************** *****@phx.gbl.. . Does anyone have any ideas how to open a new web browser window in .NET?
I'm using ASP.NET with VB as the code behind, and after some (server side) validation code may need to open a second browser window.
Any help gratefully received.
Cheers Stu.
Okay, what would you say if I want this page to open a new
window and THEN go to a different page itself? -----Original Message----- In your codebehind after the validation write the javascript to open the window to a literal control.
litScript.Te xt = "<script type=""text/javascript"">wi ndow.open('some page.aspx'); </script>"
> Okay, what would you say if I want this page to open a new window and THEN go to a different page itself?
litScript.Text = "<script>window .open('somepage .aspx');
window.location ='otherpage.asp x'</script>"
This kind of question would be better asked on a JavaScript forum...
--
To reply, remove a "l" before the @ sign.
Arnaud Weil - MCT, MCSD.Net, MCAD.Net
The example supplied below opens the new window when the
original page "reloads".
In my application I have a small java function which I
call (rather than directly calling window.open()).
Could you not set the literal to call a java function
which first calls window.open and then redirects the
original page itself?
Would that work?
Cheers
Stu. -----Original Message----- Okay, what would you say if I want this page to open a
newwindow and THEN go to a different page itself?
-----Original Message----- In your codebehind after the validation write the javascript to open the window to a literal control.
litScript.Tex t = "<script type=""text/javascript"">wi ndow.open('some page.aspx'); </script>"
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Codemonkey |
last post by:
Hi,
I am writing an App in .Net that involves some scheduling of tasks. I was
wondering if anybody has come accross any components or examples of how to
implement a schedule manager like the one in the Task Scheduler for Windows?
Basically I'm after something that'll allow me to specify a "recurring" or
"once off" schedule with advanced options like "the first monday in the
month" etc.
|
by: ~dr-sci-fi |
last post by:
hi all,
i want to use "Windows Picture Viewer and Fax Viewer" in my c# app to
manipulate images, picture viewer is found as a DLL (shimgvw.dll) in
System32 folder of
WinXP.
can some one tell me how can i use it in my C# app?
TIA
|
by: unknown |
last post by:
I compiled as following
(e.g) cl first.cpp
but following message ↓
Cannot open include file "windows.h" :Such a file or directory
What compile option is used in dotnetframework SDK 1.1 or in visual C++
toolkit2003?
|
by: Dean Slindee |
last post by:
I would like to provide a menu item that the users can click that launches
the same "Windows Security" window that doing a Ctrl+Alt+Delete launches,
but thru a Process.Start. Is this possible, and what is the name of the
..exe and it's location?
Thanks,
Dean Slindee
|
by: parsifal |
last post by:
Hi,
I'm wondering how you can use the standard C# library to get the
"windows" directory? (e.g. "c:/windows"). I need to specify the
location of a config file in a service, and I don't want to hard-code
anything.
Thanks.
| |
by: domtam |
last post by:
Hi there.
My goal is to write a windows service that can act as HTTP Request
server. How can I do that?
I know that I can use ASP.NET to develop a web site to achieve this
purpose, i.e. receive HTTP request. However, I'd like it to exist in
the form of a "Windows Service".
|
by: lisseut |
last post by:
Hi, hope I'm posting to the right forum.
I'm using C# under .NET 1.1, Windows XP SP2
I have a form and I've overridden WndProc to print to a text box whenever it
receives the WM_NCMOUSELEAVE message. Under "Windows XP Style", I get these
messages fine (when the mouse moves off the title bar or form borders).
Under "Windows Classic Style", I don't get the message at all!
Has anyone seen this?
|
by: djoefish |
last post by:
sequel to the topic "install patch on windows".....
I am currently running Python2.3 with Enthought on a windows PC. I have
been running into a memory problem (see
http://evanjones.ca/python-memory-part3.html), and would like to
install a patch. I have read a lot about it online, but can't seem to
find out how to do so on windows.
I have a 'patch' program that works, but it only patches the source
file 'obmalloc.c', which does not...
|
by: ezageza |
last post by:
Hi, does anyone know whats going on or how to fix my problem with windows media player 10. When i'm finished using it and am shutting it down it brings up a message saying something like 'windows media is configuring the background files. Do you wish to continue shutting down'. I've noticed when watching movies lately on windows media that after about 10-15 mins the movie starts to jump really badly and the only way to stop it is to stop the...
|
by: tvnaidu |
last post by:
How can I cheack CPU load on LINUX like "Windows Task manager" on Windows?. Windows task manager shows CPU load (percentage) and etc, any tool in LINux?. I know "top" command which shows which process running at highest priority right?. thanks.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |