Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling an event on Page Change

Status
Not open for further replies.

tpr25

MIS
Jul 8, 2004
6
US
Hello,
I am creating an ASP application and I am trying to call a stored procedure when the user changes the page within the application. For example, the user is on Page1, then navigates to Page2. When the user leaves Page1, I would like to update records on a server without having to click a submit button or any button like that, just automatically trigger the stored procedure when the page changes.

Is there a Page Event that handles this action or a function that could be used?

Any help would be greatly appreciated. Thank you.
 
i think there is an onunload event. but it is very ineffective, why not track the activity in page2? page 2 will give page 1 as its referer, u can track it there.

another option would be sessions. every time a user enters the page use session to track the page.

Known is handfull, Unknown is worldfull
 
Tracking the activity on Page2 would not work because the controls on Page1 are being used to update the records.

Using session variables to track the page might work, though I am using a tab strip control(.ascx) to navigate between pages. Is calling a function on page1 from the control an option?
 
>>Is calling a function on page1 from the control an option?

ASP executes before the page is displayed to the user, therefore the changes made cannot be registerd by ASP after the page loads. i suggest u take a look at IFRAMES. usng javascript u can initiate an onunload event that redirects the IFRAME page to some update page...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top