Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HttpContext and Source Page

Reply
Thread Tools

HttpContext and Source Page

 
 
Paul Cheetham
Guest
Posts: n/a
 
      12-01-2006
Hi,

I have some custom error pages, and in them I examine the
HttpContext.Current object to get information about what was happening
at the time.

Is it possible to find out from which page the user has been directed?
e.g. if I capture a 404 - page not found error, I can find the url of
the missing page, but is there a way of finding out which page the
faulty link / redirect is located on?


Thankyou.


Paul
 
Reply With Quote
 
 
 
 
Paul Cheetham
Guest
Posts: n/a
 
      12-04-2006

Thanks very much.


Paul



Eeraj wrote:
> Request.UrlReferrer will give the full path of the page that the faulty link
> was on.
>
> So, if your 404 redirect page is 404Handler.aspx and Page1.aspx has a link
> to non-existent page Nonexistent.aspx cliking on this link in page1.aspx will
> give (assuming all pages are in root folder)
>
> http://servername/website/page1.aspx for the Request.UrlReferrer in
> 404Handler.aspx
>
> - eeraj
> =====
> http://www.interviewboard.com
> .NET, SQL, C#, Oracle - interview questions
>
>
> "Paul Cheetham" wrote:
>
>> Hi,
>>
>> I have some custom error pages, and in them I examine the
>> HttpContext.Current object to get information about what was happening
>> at the time.
>>
>> Is it possible to find out from which page the user has been directed?
>> e.g. if I capture a 404 - page not found error, I can find the url of
>> the missing page, but is there a way of finding out which page the
>> faulty link / redirect is located on?
>>
>>
>> Thankyou.
>>
>>
>> Paul
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between Page.Request and HttpContext.Current.Request sripathi ASP .Net 0 12-31-2009 11:28 AM
Is it possible to retrieve the page object from HttpContext.Current? HaukiDog ASP .Net 0 03-07-2004 07:45 PM
Dim context As HttpContext = HttpContext.Current Tony ASP .Net Web Controls 2 03-03-2004 04:51 PM
Page.Cache vs HttpContext.Current.Cache DesignerX ASP .Net 5 01-20-2004 10:55 PM
HttpContext.Current.User not available in the redirected page Ali Khawaja ASP .Net Security 1 11-03-2003 11:41 AM



Advertisments