-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCart.aspx.cs
More file actions
72 lines (63 loc) · 2.08 KB
/
Copy pathCart.aspx.cs
File metadata and controls
72 lines (63 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Cart : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// BindCartProducts();
}
}
/*private void BindCartProducts()
{
if (Request.Cookies["CartPID"] != null)
{
string CookieData = Request.Cookies["CartPID"].Value.Split('=')[1];
string[] cookieDataArray = CookieData.Split(',');
if (cookieDataArray.Length > 0)
{
DataTable dtBrands = new DataTable();
for(int i=0;i< cookieDataArray.Length; i++)
{
string PID = cookieDataArray[i].ToString().Split('-')[0];
string SizeID = cookieDataArray[i].ToString().Split('-')[1];
String CS = ConfigurationManager.ConnectionStrings["MyDBConnectionString1"].ConnectionString;
using (SqlConnection con = new SqlConnection(CS))
{
using (SqlCommand cmd = new SqlCommand("select * from tblProducts where PID=" + PID + " ", con))
{
cmd.CommandType = CommandType.Text;
using (SqlDataAdapter sda = new SqlDataAdapter(cmd))
{
DataTable dtProducts = new DataTable();
sda.Fill(dtProducts);
}
}
}
}
rptrCartProducts.DataSource = dtBrands;
rptrCartProducts.DataBind();
}
else
{
}
}
else
{
}
}*/
protected void btnRemove_Click(object sender, EventArgs e)
{
}
protected void btnbuyNow_Click(object sender, EventArgs e)
{
}
}