J
John Blair
Dim shoppingCart As Market.OrderList
Session("ShoppingCart") = New Market.OrderList
'This line produces an error - error details below.
shoppingCart = Ctype(Session("ShoppingCart"), Market.OrderList)
Can anyone tell me why the above cast doesn't work and how to fix it?
Note: Setting up the session variable succeeds.
thanks.
!!!!!Error Details!!!!!
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
Line 131:
Line 132: Dim shoppingCart As Market.OrderList
Line 133: shoppingCart = Ctype(Session("ShoppingCart"),
Market.OrderList)
Session("ShoppingCart") = New Market.OrderList
'This line produces an error - error details below.
shoppingCart = Ctype(Session("ShoppingCart"), Market.OrderList)
Can anyone tell me why the above cast doesn't work and how to fix it?
Note: Setting up the session variable succeeds.
thanks.
!!!!!Error Details!!!!!
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
Line 131:
Line 132: Dim shoppingCart As Market.OrderList
Line 133: shoppingCart = Ctype(Session("ShoppingCart"),
Market.OrderList)