?
Solved

Request.QueryString in customerrors

Posted on 2006-05-02
1
Medium Priority
?
264 Views
Last Modified: 2008-03-06
I want to use the customerrors page but I want the page to show the error.
I read that the customerror page has in its querystring the error but I don't succeed to get it.
I write <%=Request.QueryString["ErrorPage"] %> but I got nothing.
How do I get the error?
(the GetLastError() is not relevant here ofcourse).
Thankyou
Anat
0
Comment
Question by:ANAT2403
1 Comment
 
LVL 9

Accepted Solution

by:
daniel_balla earned 1000 total points
ID: 16584417
Hi ANAT2403,
the errorpage variable you see in querystring is not the error (exception) itself.
To get the error you should use GetLastError() and for example you could use GetLastError in global asax (where I presume you hadle the error event) and store it on session, then redirect to an error page that reads the error from session and presents it.
However, this is not custom error pages. In order to set different pages for custom errors, you should configure them from IIS manager, but I don't think that is what you want.

Cheers!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question