关于duwamish 7.0 [英] about the duwamish 7.0

查看:77
本文介绍了关于duwamish 7.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PageBase.cs文件中,


private const String KEY_CACHECART =" Cache:ShoppingCart:";

..

..

..

..

购物车返回值=(购物车)(会话[KEY_CACHECART]);

是什么意思?

关于此的任何帮助或文件?

In PageBase.cs file,

private const String KEY_CACHECART = "Cache:ShoppingCart:";
..
..
..
..
Cart returnValue = (Cart)(Session[KEY_CACHECART]);
meaning ?
any help or document about this ?

推荐答案




代码只是在会话中存储Cart对象的值

由asp.net提供
现在当你在会话中存储值时需要一个键,你可以用它来识别它。

当你从会话中得到它的值时,它是对象。输入

你必须把它存放到你用它存储的对象中。

会话。


所以当你存储时值,代码应该如下:


会话[KEY_CACHECART] = objCart;


其中objCart是Cart类型的对象。所以在检索它时正在施放

回到购物车

HTH,

问候,

Angrez

Hi,

The code is just storing the value of Cart object in the session
provided by asp.net
Now when you store the value in the session you need a key with which
you can identify it uniquely.
Also when you get the value from the session it is of "Object" type
which you have to cast into the object with which you stored that in
the session.

So while storing the value, the code should look like:

Session[KEY_CACHECART] = objCart;

where objCart is object of Cart type. So while retrieving it being cast
back to Cart
HTH,
Regards,
Angrez


这意味着存储在会话密钥Cach:ShoppingCart:中的对象。

明确地输入到Cart类型的对象。

Gabriel Lozano-Morán
This means that the object stored in the session key "Cach:ShoppingCart:" is
explicitly casted to an object of type Cart.

Gabriel Lozano-Morán


Cach是什么意思?


" Gabriel Lozano-Morán" < GA ************ @ no-spam.com> D'è????¢

新闻:eJ ************** @ TK2MSFTNGP14.phx.gbl ...
Cach meaning ?

"Gabriel Lozano-Morán" <ga************@no-spam.com> D′è????¢
news:eJ**************@TK2MSFTNGP14.phx.gbl...
这意味着存储在会话密钥Cach:ShoppingCart:中的对象存储在会话密钥中。
明确地转换为Cart类型的对象。

Gabriel Lozano-Morán
This means that the object stored in the session key "Cach:ShoppingCart:" is explicitly casted to an object of type Cart.

Gabriel Lozano-Morán



这篇关于关于duwamish 7.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆