This topic is locked

AfterSuccessfullLogin Event Not Working

1/20/2006 11:08:58 PM
ASPRunnerPro General questions
pbunyon99 author

I'm trying to add a hit counter to count successfull logins, but the event doesn't seem to work.

I do have my 'counter.inc.asp' included in my template. The custom code gets written, but the hit never gets recorded. I'm using beta 4.0.79.
I took a second look, and I think the problem is that the <!--#INCLUDE FILE="include/counter.inc.asp"-->

is not being recognized. If I add it manually to the top of 'login.asp', I think it works.

Have to test later, getting to late.
[from login.asp]

' AfterSuccessfullLogin Event

DoEvent "Call AfterSuccessfulLogin()"
[from events.asp]

Sub AfterSuccessfulLogin()

'** Custom code ****

' put your custom code here

<!--#INCLUDE FILE="include/counter.inc.asp"-->

response.write DisplayImg( TotalHits(CurrentURL), "" )

End Sub

admin 1/24/2006

Nothing is wrong with event.
You cannot use constructions like <!--#INCLUDE FILE="include/counter.inc.asp"--> in ASP code, it works outside ASP only.
Use Server.Execute("include/counter.inc.asp") instead.