asp中是如何实现购物车的?
请教:在asp中是如何实现购物车的?希望能写的详细点,谢谢!
Session
给说思路吧。在gridview显示商品信息,登录后单击商品信息,显示商品的价格--(购物车开始)--
你单击购买时,先判断你购物车的钱数--然后把商品信息进入到购物车里--购物车的总钱数减去商品的钱数--然后其它设置。
session
C# code:
/// <summary>
/// 获得 购物车列表
/// </summary>
/// <returns></returns>
public static List<Entity.Goods> GetCartList()
{
object obj = HttpContext.Current.Session["CartList"];
List<Entity.Goods> cartList = null;
if (obj == null)
{
cartList = new List<Entity.Goods>();
HttpContext.Current.Session["CartList"] = cartList;
}
else
{
cartList = obj as List<Entity.Goods>;
}
return cartList;
}
/// <summary>
/// 购物车添加商品
/// </summary>
/// <param name="goods"></param>
public static void AddGoodsToCart(Entity.Goods goods)
{
List<Entity.Goods> list = CartFun.GetCartList();
bool isAdd = true;
for (int i = 0; i < list.Count; i++)
{
if (goods.Id == list[i].Id)
{
is
相关问答:
http://www.zgjhjy.com/Test/PrimaryTest/Index.aspx
就是类似以上的在线测试系统,需要有一个后台的,语言是asp的,数据库是access的,还需要能在后台对信息进行添删改查的。谢谢各位了。。。
程序真的很多,不知 ......
调整了这里,那里出问题。
有没有什么好的方法,像调整对话框一样????
找个专门做页面的
在dreamweaver里调。。。也可以直接控制HTML代码
确实痛苦 感同身受呀
哈哈 坚决路过。
用DW吧,VS搞设计 ......
A页面
<table width="200" border="1">
<tr>
<td>1</td>
<td>3</td>
<td><!--#include/top.html#-- ......
问题是这样的,现在有一个工资表,是EXCEL的,我要把它导入ACCESS,因为 要查询每个人的工资,根据不同的编号可以查询到相对的人,
用ASP 怎么将EXCEL导入到ACCESS,而且每月都有不同的表,
引用
其实就是把EXCEL当成数 ......
3个radioButton
一个Button
一个label
C# code:
protected void Button1_Click(object sender, EventArgs e)
{
string str = null;
RadioButton rdo=(RadioButton)sender;
......