HTTP Handlers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to detect where a user has come from withinh my application.

If they are on page1.aspx and they go to page2.aspx, I want to be able to find what was the previous page they were on.

Can I use a HTTP Handler to get this info?

How?

Thanks,
C.
 
C said:
Hi,

I want to detect where a user has come from withinh my application.

If they are on page1.aspx and they go to page2.aspx, I want to be able to find what was the previous page they were on.

Can I use a HTTP Handler to get this info?

How?

Thanks,
C.

You might look at Request.UrlReferrer, or store the current page
in session, just after you have read the current value as "previous page".

Hans Kesting
 
Yes. If you call this.Context.Handler on page2.aspx, you will get reference
to page1.aspx.

Eliyahu

C said:
Hi,

I want to detect where a user has come from withinh my application.

If they are on page1.aspx and they go to page2.aspx, I want to be able to
find what was the previous page they were on.
 
C said:
Hi,

I want to detect where a user has come from withinh my application.

If they are on page1.aspx and they go to page2.aspx, I want to be able to
find what was the previous page they were on.
Can I use a HTTP Handler to get this info?

Not really. What happens if they just type page2.aspx into their browser's
address bar?

Request.UrlReferrer holds the referring page - but only if the browser
decides to tell you the referring page. Otherwise, Request.UrlReferrer will
be null.
 
Back
Top