Created
January 17, 2018 10:22
-
-
Save anonymous/837ff837ca96a9c8ffcce50bd4c49637 to your computer and use it in GitHub Desktop.
Code , Please help solving this error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using System.Data; | |
using System.Data.SqlClient; | |
public partial class user_view_card : System.Web.UI.Page | |
{ | |
String s; | |
String t; | |
String[] a = new string[5]; | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
DataTable dt = new DataTable(); | |
dt.Columns.AddRange(new DataColumn[5] { new DataColumn("product_name"), new DataColumn("product_desc"), new DataColumn("product_price"), new DataColumn("product_qty"), new DataColumn("product_images") }); | |
if (Request.Cookies["aa"] != null) | |
{ | |
s = Convert.ToString(Request.Cookies["aa"].Value); | |
string[] strArr = s.Split('|'); | |
for (int i = 0; i < strArr.Length; i++) | |
{ | |
t = Convert.ToString(strArr[i].ToString()); | |
string[] strArr1 = t.Split(','); | |
for (int j = 0; j < strArr1.Length; j++) | |
{ | |
a[j] = strArr1[j].ToString(); | |
} | |
dt.Rows.Add(a[0].ToString(), a[1].ToString(), a[2].ToString(), a[3].ToString(), a[4].ToString()); | |
} | |
} | |
d1.DataSource = dt; | |
d1.DataBind(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment