Error BC30451 with VBC : Name Application is not declared

Last post 01-03-2007 6:53 AM by Mappy. 0 replies.

Sort Posts:

  • Error BC30451 with VBC : Name Application is not declared

    01-03-2007, 6:53 AM
    • Member
      point Member
    • Mappy
    • Member since 01-03-2007, 6:45 AM
    • Posts 1

    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
      

Page 1 of 1 (1 items)