473,698 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET - How to display a concurrent seperate page?

Hi,

I need to display a seperate error page (off a try...catch block) in
ASP.NET.
Response.Redire ct and Server.Transfer won't work in this case because
they replace the
old page with a new one and I want both pages to be displayed (error
page on top of course).

An alternate question is; how can I call a javascript function from an
ASP.NET method?
That way I can simply use the window.alert("e rror message here");
javascript function.

Thanks
Steve

Jun 7 '07 #1
3 1315
This may help you:

How to Pass Messages and Actions between Server and Client
http://usableasp.net/DeveloperPage.a...rAndClient.htm
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Steve Kershaw" <st***********@ yahoo.comwrote in message
news:11******** **************@ n4g2000hsb.goog legroups.com...
Hi,

I need to display a seperate error page (off a try...catch block) in
ASP.NET.
Response.Redire ct and Server.Transfer won't work in this case because
they replace the
old page with a new one and I want both pages to be displayed (error
page on top of course).

An alternate question is; how can I call a javascript function from an
ASP.NET method?
That way I can simply use the window.alert("e rror message here");
javascript function.

Thanks
Steve

Jun 7 '07 #2
this can only be done in javascript. you need to understand the web
model. the browser request a page, asp.net process the request and sends
back an html document. the doc header can contain a redirect command,
but there is no open window command. your return document can contain
inline javascript that is executed when the browser renders the page.

<script>window. alert('hi');</script>

in the old days before popup blockers, the inline javascript could open
a window.
-- bruce (sqlwork.com)

Steve Kershaw wrote:
Hi,

I need to display a seperate error page (off a try...catch block) in
ASP.NET.
Response.Redire ct and Server.Transfer won't work in this case because
they replace the
old page with a new one and I want both pages to be displayed (error
page on top of course).

An alternate question is; how can I call a javascript function from an
ASP.NET method?
That way I can simply use the window.alert("e rror message here");
javascript function.

Thanks
Steve
Jun 7 '07 #3
On Jun 7, 8:04 am, Steve Kershaw <steve_kers...@ yahoo.comwrote:
Hi,

I need to display a seperate error page (off a try...catch block) in
ASP.NET.
Response.Redire ct and Server.Transfer won't work in this case because
they replace the
old page with a new one and I want both pages to be displayed (error
page on top of course).

An alternate question is; how can I call a javascript function from an
ASP.NET method?
That way I can simply use the window.alert("e rror message here");
javascript function.

Thanks
Steve
You could always display the error, then auto-redirect after x
seconds, or a user click

in side js block...
function redirTimer( sURL, iSecondsDelay){
self.setTimeout ("self.location .href='" + sURL + "';",
iSecondsDelay);
//show(false,'tes tJava');
}

or

open a new window after page load (pop up blockers could be
problematic like bruce mentioned.
function popWin1(url, thePreference)
{
// Create offset
if (document.all) {
xMax = screen.width;
yMax = screen.height;
}
else {
if (document.layer s) {
xMax = window.outerWid th;
yMax = window.outerHei ght;
}
else {
xMax = 400;
yMax=480;
}
}
var xOffset = (xMax - 586)/2;
var yOffset = (yMax - 700)/2;

thePreference = thePreference + ',screenX='+xOf fset
+',screenY='+yO ffset+',top='+y Offset+',left=' +xOffset
+'resizable=tru e,scrollbars=ye s';

// alert("Preferen ce = " + thePreference);
if (typeof(popupWi n) != "object"){
popupWin = window.open(url , 'window2', thePreference);
}
if (popupWin.close d){
popupWin = window.open(url , 'window2', thePreference);
}
if( popupWin.opener == window) {
popupWin.focus( );
return;
}
return;
}

Jun 7 '07 #4

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

Similar topics

1
2588
by: PeeZee | last post by:
I am having some trouble getting this done. I am able to get the value to display on a seperate page but not on the same page in the same form. I would like to display to set value of the radio button into a text field. Also, would need to multiply and add values of radio buttons as the are selected into seperate text field and have a subtotal display in the last of the fields.
4
5406
by: MCDONAMW | last post by:
First off, forgive me for being such a noob. I typically program vb.net, but I need to do some asp.net programming. I have something simple I have no idea how to do! I have an aspx page which is essentially a form containing a few text boxes and a submit button. The user types in the various fields, and hits the submit button. This button fires off an email via smtp containing information from
0
1168
by: mkd1919 | last post by:
I have a website that performs a search on an indexing service and returns the results. During the initial load, I get the recordcount through a DS, then bind a DataList using a second DS with page count of 20. This site executes successfully on my local machine and indexing service. When ran on the intended server, the app retrieves the record count, then binds the data in the 2nd DS, but doesn't display the records bound to the...
2
2913
by: Abhishek Srivastava | last post by:
Hello All, I am trying to obtain an image asynchronously for this I have written code which uses XMLHTTP object to retreive the image. now I have to display this image in an iframe. when I say iframe.contentWindow.document.write(xmlHttp.responseText); I get an text as "JFIF" in my frame.
9
2810
by: cendrizzi | last post by:
Hi all, I've read some stuff on this but can't seem to come up with a solution that works right. I have a semi-mature (yet very large and robust) internal web application that currently only works with one window open at a time. Maybe I'm abusing the use of $_SESSION but I have data entry processes split up in several steps (which is required since depending on what was put before determines what pages will be shown after). To store...
2
4082
by: squidge1990 | last post by:
im searching a page of products to find a certain product. the search must take the value that i have input into a certain cell then search through the like of products until in makes a match and then take details of that product and display it on a seperate page then move to the page that is displaying the details of the product. i have an idea of how to do this but as im kind of new to vba i dont know what sort of code to be using or how to...
6
4116
by: goraya | last post by:
This is design level discussion about web applications. How I design application that support 1 million concurrent requests??
36
4780
by: beebelbrox | last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code. WIndows OS MSaccess 2003 This code is attached to an unbound form that will display a specific recordset based in information passed to the form from another form. The problem I am having is that for each of the case statements the proper records (values and Number of records) are being returned but the movement commands do not work or do not display...
0
13347
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed programatically either from UNIX or Oracle PLSQL. In this Section, I will be explaining about calling a Concurrent program from UNIX using the CONCSUB Command. Pre-requisite: 1. Concurrent Program should be registered in oracle Applications...
0
8674
marktang
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...
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,...
1
8895
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
7725
agi2029
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...
1
6518
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.