Community discussion forum

how to typecast Session object to class object.

  • 3 months ago

    Hello All

     

    I am have an object in the session variable.

    Now, when I retrieve the object from the session variable, i want to typecast it to its class.

    I am using the following code, but its not woking :(

    dim objCustomer ''''As Customer
    SET objCustomer = new Customer

    If IsObject(Session("customer")) Then
        objCustomer = CType(Session("customer"), objCustomer )
    End If

     

    Can u pls let me know, I am missing something.

     

    Ankit

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).