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

Using Error Msg box on website

I am working on a web project (web-site) in Visual Studio 2005 in the C#
language and want to bring up a sort of error message window as part of my
try and catch blocks on certain parts of my code. At the moment just using
the basic Console.Writeline to output the Exception's message (which as you
can imagine is not much use on a Website!!). Please can someone show me the
basic code to output a window or a form with the error message from a try and
catch statement please..
--
The good die young.....
May 4 '06 #1
2 1028
"Makaveli" <Ma******@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
I am working on a web project (web-site) in Visual Studio 2005 in the C#
language and want to bring up a sort of error message window as part of my
try and catch blocks on certain parts of my code. At the moment just using
the basic Console.Writeline to output the Exception's message (which as
you
can imagine is not much use on a Website!!). Please can someone show me
the
basic code to output a window or a form with the error message from a try
and
catch statement please..
EventLog.WriteEntry to save the error information where only the server
admin can see it.

Response.Redirect to send your user to an "internal failure, call support"
page.
--
The good die young.....

May 4 '06 #2
A web application is quite a bit different from a Windows app. When the
browser hits the site, the site just respond with some output. You could
just write at a particular place in the current page being build (or use
client side JS to display a message box when this page loads or discard the
output and display a generic error page depending on what exactly you have
caught).

I would start by having a global error handler (see global.asax in the
documentation) that displays a generic message. This handler can mail the
error details to support staff.

--
Patrice

"Makaveli" <Ma******@discussions.microsoft.com> a écrit dans le message de
news: CA**********************************@microsoft.com...
I am working on a web project (web-site) in Visual Studio 2005 in the C#
language and want to bring up a sort of error message window as part of my
try and catch blocks on certain parts of my code. At the moment just using
the basic Console.Writeline to output the Exception's message (which as
you
can imagine is not much use on a Website!!). Please can someone show me
the
basic code to output a window or a form with the error message from a try
and
catch statement please..
--
The good die young.....

May 4 '06 #3

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

Similar topics

1
by: Nelson R. | last post by:
Hi, i need to get some info from a website page that requires an certificate. Ive got the provided certificate installed in IE, and when accessing the website page, it shows a window to...
1
by: Ramanfromoz | last post by:
Hi, Developing a new we application. Everything okay on my local WIN XP PROFESSIONAL, IIS 5.0 running locally. The website is running smoothly. Now, the same code I am copying over to a...
0
by: kammaldeep | last post by:
hi, i m newbie 2 PHP & to b frank ... will alwaz be ... i dont think i will go into much details with PHP as my work doesnot include workin with PHP bt i have a forum .. and i want to make a...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
4
by: joaotsetsemoita | last post by:
Hi everybody, Im trying to access a Ms Access database outside my root website folder, so Im using ODBC DSN. I have already the DSN create and working (this same DSN is used by many classic ASP...
2
by: =?Utf-8?B?TmFt?= | last post by:
On my ASP.NET 2.0 website project on VS 2005, I am getting the following error when building the solution: “The type or namespace name 'ADSI' does not exist in the namespace 'myNameSpace' (are...
2
by: =?Utf-8?B?Q29saW4gRGVzbW9uZA==?= | last post by:
Hi All, I have a solution file that contains a number of projects, a web service and a website. These all build fine in VS2008, and all but the website builds fine using MSBuild. The website,...
4
by: Mandar | last post by:
Hi, I have written some code in C# to programmatically create a website and an application pool. Both seems to be getting created alright with whatever settings I have applied. However, when I...
0
by: teddarr | last post by:
I have a Windows Server 2003. I am trying to run multiple websites on the server. I am using host headers to run the websites on only one ip address. Before anyone says this is an iis issue and...
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: 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: 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...
0
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,...
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
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...
0
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,...

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.