实现Profile购物车的匿名用户迁移
来源:互联网 发布:电脑闹钟提醒软件 编辑:程序博客网 时间:2024/06/05 18:40
实现Profile购物车的匿名用户迁移
IE
在Global.asax文件中,增加一个方法:
protected void Profile_MigrateAnonymous(Object s, ProfileMigrateEventArgs e)
{
ProfileCommon anonProfile = Profile.GetProfile(e.AnonymousID);
//迁移Profile用户名
//Profile.userName = anonProfile.userName;
//迁移购物车
//Profile.ShoppingCart = anonProfile.ShoppingCart;
IEnumerator ie = anonProfile.ShoppingCart.CartItems.GetEnumerator();
while (ie.MoveNext())
{
Profile.ShoppingCart.AddCartItem((CartItem)ie.Current);
}
//清除匿名COOKIE,不然每次请求页面都执行此事件
AnonymousIdentificationModule.ClearAnonymousIdentifier();
// Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1);
//匿名COOKIE标识已重置,下次匿名访问将创建新的profile数据条,原来的匿名profile数据条已无意义
ProfileManager.DeleteProfile(e.AnonymousID);
}
- 实现Profile购物车的匿名用户迁移
- 实现Profile购物车的匿名用户迁移
- 实现Profile购物车的匿名用户迁移
- ASP.net 2.0 学习使用用户配置文件Profile对象(三)如何合并匿名用户配置文件Profile对象解决购物车的问题
- 利用Profile做支持匿名用户到登录用户转移购物车
- profile实现购物车
- 实现匿名用户向注册用户迁移
- Profile实现购物车(应用Profile)(2)
- Profile 详解之匿名用户 Profile 使用
- Asp.Net 2.0的匿名用户的Profile
- Profile实现的Asp.Net购物车持久化实战视频
- 为注册用户实现复杂的数据类型配置--购物车
- Profile 详解之匿名用户初探
- Profile 详解之匿名状态迁移至登录状态
- WebApplication与Profile购物车
- Profile购物车代码片段
- WebApplication与Profile购物车
- 购物车的实现
- iOS UIControl 几个事件的说明
- 求数组的子数组之和的最大值
- dll中多线程使用回调函数
- ArcGIS资料
- html中后台动态绑定数据表格存在空白单元格问题
- 实现Profile购物车的匿名用户迁移
- UIPageControl背景
- UIViewAnimation动画与Core Animation的CATransition类动画
- Could not load file or assembly "xxx" or one of its dependencies. The system cannot find the file sp
- 树-AVL树
- 守护线程、非守护线程简介和addShutdownHook方法使用
- Siebel Error: Unable to find definition for component CommOutboundMgr. (SBL-SRQ-0013)
- 截屏 发送邮件
- 点击出星