473,383 Members | 1,859 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,383 software developers and data experts.

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.Redirect 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("error message here");
javascript function.

Thanks
Steve

Jun 7 '07 #1
3 1304
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.googlegro ups.com...
Hi,

I need to display a seperate error page (off a try...catch block) in
ASP.NET.
Response.Redirect 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("error 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.Redirect 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("error 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.Redirect 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("error 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,'testJava');
}

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.layers) {
xMax = window.outerWidth;
yMax = window.outerHeight;
}
else {
xMax = 400;
yMax=480;
}
}
var xOffset = (xMax - 586)/2;
var yOffset = (yMax - 700)/2;

thePreference = thePreference + ',screenX='+xOffset
+',screenY='+yOffset+',top='+yOffset+',left='+xOff set
+'resizable=true,scrollbars=yes';

// alert("Preference = " + thePreference);
if (typeof(popupWin) != "object"){
popupWin = window.open(url, 'window2', thePreference);
}
if (popupWin.closed){
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
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...
4
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...
0
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...
2
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...
9
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...
2
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...
6
by: goraya | last post by:
This is design level discussion about web applications. How I design application that support 1 million concurrent requests??
36
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...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.