using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Admin_WishListAdd : System.Web.UI.Page { //DataClassesDataContext db = new DataClassesDataContext(); Product prod = new Product(); string p_id, p_btitle, p_img, p_desel, p_desen; protected void WishAdd(object sender, EventArgs e) { p_id = prod.ProductID.ToString(); p_btitle = prod.ModelNameEl; p_img = prod.ProductImage; p_desel = prod.DescriptionEl; p_desen = prod.DescriptionEn; HttpCookie WishCookies = new HttpCookie("WishCookies"); WishCookies.Value = prod.ProductID.ToString(); WishCookies.Expires = DateTime.Now.AddHours(2); Response.Cookies.Add(WishCookies); } }
HttpCookie WishCookie = new HttpCookie("WishList"); //A) WishCookie.Value = "Whatever"; //B) //WishCookie.Values["Val1"] = "1"; //WishCookie.Values["Val2"] = "2"; //WishCookie.Values["Val3"] = "3"; WishCookies.Expires = DateTime.Now.AddHours(2); Response.Cookies.Add(WishCookie);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)