Hi,
I am using the shopping cart property
Code:
Public Shared ReadOnly Property ShoppingCart() As ShoppingCart
Get
If HttpContext.Current.Session("ShoppingCart") Is Nothing Then
HttpContext.Current.Session("ShoppingCart") = New ShoppingCart()
End If
Return CType(HttpContext.Current.Session("ShoppingCart"), ShoppingCart)
End Get
End Property
as in c#
Code:
public static ShoppingCart ShoppingCart
{
get
{
if ((HttpContext.Current.Session[" ShoppingCart"] == null))
{
HttpContext.Current.Session["ShoppingCart"] = ShoppingCart;
}
return (ShoppingCart)HttpContext.Current.Session["ShoppingCart"];
}
}
but it is giving error:
An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
I think i am calling session variable which is not declared. can you suggest,
where this is declared in webshop project