GridView1.DataSource = ArrListName
GridView1.DataBind()
This can show my data.However,the GridView control show all of the ArrayList's data in one column named Item,which make the page long and ugly.
I just want to show my ArrayList's data(a set of Array) like a table in the GridView control .
Can someone help me to solve this problem?
Thanks a lot !
mycaert.cs
if (Session["MyCartItems"] != null) {
// int ProductId = Convert.ToInt32(Request.QueryString.Get("ProductIdLabel"));
// ArrayList cart1 = new ArrayList();
// cart1 = (ArrayList)Session["MyCartItems"];
// Session["MyCartItems"] = cart1;
// GridView1.DataSource = cart1;
// GridView1.DataBind();
//}
mycart.aspx
--%>
Back To Home
please help me
mycart.aspx
BorderColor="#660033" BorderStyle="None" BorderWidth="1px" CellPadding="3"
CellSpacing="2" Width="439px"
ShowFooter="True"
ForeColor="White" >
<%--
HeaderText="Unit Price" ReadOnly="True" />
HeaderText="Total Price" />--%>
<%--
<%----%>
ConnectionString="<%$ ConnectionStrings:ShoppingDBConnectionString %>"
SelectCommand="SELECT [ProductId],[ProductName],[UnitPrice],[Discription] FROM [Product] WHERE ([ProductId]=@ProductId)">
please help me
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

velmurugan pPosted Mar 28, 2011, 1:44 AM