T
tshad
Is there a way to run a script or function on entry of each page without
having to put a call in each page?
Periodically, I find something I want to do each time a page is entered and
I have to go into each page and add a line or 2 in my asp.net code. That's
a lot of pages and I could easily miss one.
For example, I have a user object that I built that I just added a field -
LastPageVisited. This was necessary because, apparently, you can't depend
on the referrer to have the last page. I need this to tell me where I came
from in my site or if I even came from a page in my site or whether a user
just typed the URL into the address line of the browser.
So now I just add the line
Session("User").LastPageVisited = "This Page".
But I have to add this to about 150 pages.
If I make a change to this, I need to make the change to each 150 pages.
Thanks,
Tom
having to put a call in each page?
Periodically, I find something I want to do each time a page is entered and
I have to go into each page and add a line or 2 in my asp.net code. That's
a lot of pages and I could easily miss one.
For example, I have a user object that I built that I just added a field -
LastPageVisited. This was necessary because, apparently, you can't depend
on the referrer to have the last page. I need this to tell me where I came
from in my site or if I even came from a page in my site or whether a user
just typed the URL into the address line of the browser.
So now I just add the line
Session("User").LastPageVisited = "This Page".
But I have to add this to about 150 pages.
If I make a change to this, I need to make the change to each 150 pages.
Thanks,
Tom