Hi
I try to compile a vb file with vbc and there are few errors like BC30451 : Name application is not declared
Problem appears for session and application.
If someone 's an idea.... thanks !
here is the code :
Imports system
Imports Microsoft.VisualBasic
Namespace GestTicket
Public Class Ticket
Public Function InitTicket(ByVal UserId As String) As Boolean
Dim flag As Boolean = False
If Session.Contents(UserId) Is Nothing Then
application(UserId) = DateTime.Now.tostring("t")
flag = True
End If
Return flag
End Function
Public Function UpdateTicket(ByVal UserId As String) As Boolean
Dim flag As Boolean = False
If application(UserId) <> Nothing Then
application(UserId) = DateTime.Now.tostring("t")
flag = True
End If
Return flag
End Function
Public Function CheckTicket(ByVal UserId As String) As Boolean
Dim flag As Boolean = True
If application(UserID) Is Nothing Then
flag = False
End If
Return flag
End Function
Public Sub KillTicket(ByVal UserId As String)
application.remove(UserId)
End Sub
End Class
End Namespace