If there is, I'd be surprised.

Global.ASPX is processed once when IIS spins up the site on the first
request made for the site, then once again for each session. There's no pure
"page" mechanism for it.

However, each of your pages could include some logic like this:

If IsPostBack then
        do whatever
Else
        LogAsNewHit()
        do whatever
End If

I'm guessing that you don't want to have to that in each page, however. You
might be able to create a sub-class of WebForm that your other pages would
derive from that would have this logic in it.

This might be a good one to bring up the User Group meeting next week if
your planning to come. ;)

Thanks!
Kent Tegels
Wrox Press Contributing Author

-----Original Message-----
From: Tom Tinsley [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 15, 2003 7:17 AM
To: dotnet
Subject: Postback


Is there anyway to determine if a page is a postback in the global.asax? I
am trying to log hits to aspx files in a database, but I only want to log
the hit this first time the page is accessed by a user not every time the
page does a round trip to the server.

Thanks
Tom

---
You are currently subscribed to dotnet as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search Subscription
Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/

---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to