HTTP Handlers

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.
 
H

Hans Kesting

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
 
E

Eliyahu Goldin

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.
 
J

John Saunders

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top