EasyShop/Cart/CartDel.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
namespace Mall.Cart
{
public partial class CartDel : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string id = Request.QueryString["id"] == null ? "0" : Request.QueryString["id"].ToString();
string buylist = Request.Cookies["cart"].Value == "" ? string.Empty : Request.Cookies["cart"].Value.ToString();
buylist = Server.UrlDecode(buylist);
string[] buylists = buylist.Split(new char[] { ',' });
StringBuilder str_cartn = new StringBuilder();
string str_cart = string.Empty;
foreach (string s in buylists)
{
string ido = s.Split(new string[] { "{$s$}" }, StringSplitOptions.None)[0].ToString();
if (Convert.ToInt32(id) != Convert.ToInt32(ido))
{
str_cartn.Append(s);
str_cartn.Append(",");
}
}
str_cart = str_cartn.ToString();
if (str_cart.Length > 0)
{
str_cart = str_cart.Substring(0, str_cart.Length - 1);
}
Response.Cookies["cart"].Value = Server.UrlEncode(str_cart);
Response.Redirect("/cart/cart.aspx");
//return RedirectToAction("cart", "cart");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。