Asp.Net Routing或Url Rewite和购物车 [英] Asp.Net Routing or Url Rewite and shopping cart

查看:59
本文介绍了Asp.Net Routing或Url Rewite和购物车的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请帮我解决这个问题 -



1. 关于网址重写的问题

a。如果客户端去:〜/ services.aspx?id = 1 - url应该更改为〜/ services / abcd

[此服务名称在数据库中,将在接收请求的时间将相应更改]

b。如果客户去:〜/ services.aspx - 网址应更改为〜/ services

[客户应该看到所有服务]



2. 饼干中的购物车

值将以格式存储在cookie中( id,quantity | id,quantity | ...

也请帮我热销将这些商品存放在购物车中并检索它们以便在购物车页面中显示。



这是一个关于4.5框架的asp.net网站。我完全坚持这些问题,但无法解决任何问题。



提前致谢....


please help me out to solve this issue -

1. Issue about url Rewriting
a. if client goes to : "~/services.aspx?id = 1" - url should change to "~/services/abcd"
[this service name is in the database, which will be checked at the time to receiveing the request and will be changed accordingly]
b. if client goes to : "~/services.aspx" - url should change to "~/services"
[client should sees all the services]

2. Shopping cart in cookies
value will stored in cookies in the format (id,quantity|id,quantity|...)
also please help me out hot to store these items in shopping cart and also retrieve them to show in cart page.

this is an asp.net website on 4.5 framework. i am completely stuck up with these issues, but unable to solve out anything.

Thanks in advance....

推荐答案

请参考本文中给出的代码



使用ASP.NET重写URL的示例 [ ^ ]
Please refer code given in this article

An Example of URL Rewriting With ASP.NET[^]


这篇关于Asp.Net Routing或Url Rewite和购物车的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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