Problems with HTTP_REFERER
- From: "Paperback Writer" <newsgroupms@xxxxxxxxx>
- Date: Tue, 19 Jul 2005 18:02:34 -0300
Hi, I have the following code in my ASPX:
private string pagina =
System.IO.Path.GetFileName(System.Web.HttpContext.Current.Request.ServerVariables["HTTP_REFERER"].ToUpper());
The problem is it: When i call this page directly i get an error:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
I really need that, but i do not know how to accomplish this. Does someone
can help me ?
.
- Follow-Ups:
- Re: Problems with HTTP_REFERER
- From: John Timney \(ASP.NET MVP\)
- Re: Problems with HTTP_REFERER
- From: Mark Fitzpatrick
- Re: Problems with HTTP_REFERER
- From: Kevin Spencer
- Re: Problems with HTTP_REFERER
- Prev by Date: Re: Need help with custom Web Controls
- Next by Date: Re: Paging question
- Previous by thread: Paging question
- Next by thread: Re: Problems with HTTP_REFERER
- Index(es):
Relevant Pages
|