You can't access instance variable without the class instance. In the code behind of ascx
you may create a public instance of type Cart
like:
Code behind of ascx:
public MYSCommon.Cart myCart = new MYSCommon.Cart();
later you can access it like:
in ascx
:
<span> <%= myCart.Value %> </span>
Just make sure that myCart
is declared as public
and at Page
level.