ArrayList onto DataControl; Gridview, datalist etchttp://forums.asp.net/t/1369791.aspx/1?ArrayList+onto+DataControl+Gridview+datalist+etcTue, 20 Jan 2009 14:25:04 -050013697912858797http://forums.asp.net/p/1369791/2858797.aspx/1?ArrayList+onto+DataControl+Gridview+datalist+etcArrayList onto DataControl; Gridview, datalist etc <p>Hellow Programmers&nbsp;</p> <p>I have got a datalist from Database which Lists my products with HyperLink that takes a QueryString of ProductName, ProductID and productPrice, as I retrieve the QueryString I transfered into a Session variable. Now I need to Store these values into an ArrayList onto a DataControl so I can see How many Items I have clicked and put it back onto a table in the database?</p> <p>I have pasted&nbsp;my current code.&nbsp;Thanks</p> <p><font color="#0000ff" size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">Protected</font></font><font color="#000000" size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Sub</font></font><font color="#000000" size="2"> Page_Load(</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ByVal</font></font><font color="#000000" size="2"> sender </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font color="#000000" size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Object</font></font><font color="#000000" size="2">, </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ByVal</font></font><font color="#000000" size="2"> e </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font color="#000000" size="2"> System.EventArgs) </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Handles</font></font><font color="#000000" size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Me</font></font><font size="2"><font color="#000000">.Load&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">If</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Not</font></font><font size="2"> Request.QueryString(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;id&quot;</font></font><font size="2">) </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Is</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Nothing</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Then&nbsp;&nbsp;</font></font></font></font></p> <p><font color="#0000ff" size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> productID </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Integer</font></font><font size="2"> = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Integer</font></font><font size="2">.Parse(Request.QueryString(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;id&quot;</font></font><font size="2">))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Session.Add(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;ID&quot;</font></font><font size="2">, productID)&nbsp;</font></font></font></p> <p><font color="#0000ff" size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> Name </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">String</font></font><font size="2"> = (Request.QueryString(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;name&quot;</font></font><font size="2">))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Session.Add(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;ProductName&quot;</font></font><font size="2">, Name)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> Price </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Decimal</font></font><font size="2"> = (Request.QueryString(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Price&quot;</font></font><font size="2">))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Session.Add(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;ProductPrice&quot;</font></font><font size="2">, Price)</font></font></font><font size="2"> </p> lblname.Text = Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;ProductName&quot;</font></font><font size="2">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lblprice.Text = Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Productprice&quot;</font></font><font size="2">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lblid.Text = Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;id&quot;</font></font><font size="2">)</font><font size="2"> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">End</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">If&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">End</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Sub</p> </font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> a </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> ShoppingCartItem = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">New</font></font><font size="2"> ShoppingCartItem()</font><font size="2"> </font><font size="2"> <p>a.ProductID = Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Id&quot;</font></font><font size="2">)&nbsp;&nbsp;&nbsp;</font></p> <p><font size="2">a.Productname = Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;name&quot;</font></font><font size="2">)&nbsp;&nbsp;</font></p> <p><font size="2">a.ProductPrice = Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;price&quot;</font></font><font size="2">)</font></p> <p><font size="2">a.Quantity = txtquantity.Text&nbsp;</font></p> <p><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> a1 </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> ArrayList&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p> <p><font size="2">a1 = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">CType</font></font><font size="2">(Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;cartList&quot;</font></font><font size="2">), ArrayList)</font><font size="2">&nbsp;&nbsp;&nbsp;</font></p> <p><font size="2">&nbsp;a1.Add(a)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p> <p><font size="2">&nbsp; Session.Add(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;cartList&quot;</font></font><font size="2">, a1)&nbsp;&nbsp;&nbsp;</font><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p> <p><font size="2">GV.DataSource = a&nbsp;&nbsp;&nbsp;&nbsp;</font></p> <p><font size="2">GV.DataBind()</font></p> <p><font size="2">Please Help</p> </font> 2009-01-10T13:07:49-05:002859774http://forums.asp.net/p/1369791/2859774.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p><font color="#0000ff">Dim</font><font size="2"> a1 </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> ArrayList&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p> <p>should be chnaged to</p> <p><font color="#0000ff">Dim</font><font size="2"> a1 </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As New</font></font><font size="2">&nbsp;ArrayList&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p> <p>&nbsp;</p> <p>By the way what is the Error??</p> 2009-01-11T05:59:17-05:002860346http://forums.asp.net/p/1369791/2860346.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Thanks Musadarkhan, I changed as you said but still throwing error (Data source is an invalid type. &nbsp;It must be either an IListSource, IEnumerable, or IDataSource.) my objective is to put a Productname, productId, productPrice which are retrieved from a querystring with quantity from a textbox into a data-container&nbsp; and put the rows back into a datatable. do I have to make a dataset and table! someone can tell me how. Many Thanks.<br> <br> </p> 2009-01-11T15:26:44-05:002860362http://forums.asp.net/p/1369791/2860362.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>this way</p> <font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> dt </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">New</font></font><font size="2"> DataTable</font><font size="2"> <p>dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductID&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</p> dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Productname&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</font><font size="2"> <p>dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductPrice&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</p> dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Quantity&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</font><font size="2"> <p>dt.AcceptChanges()</p> <p>dt.Rows.Add()</p> dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductID&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Id&quot;</font></font><font size="2">)</font><font size="2"> <p>dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Productname&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;name&quot;</font></font><font size="2">)</p> dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductPrice&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;price&quot;</font></font><font size="2">)</font><font size="2">dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Quantity&quot;</font></font><font size="2">) = txtquantity.Text</font><font size="2"> <p>dt.AcceptChanges()</p> <p>GV.DataSource = dt</p> <p>GV.DataBind()</p> </font> 2009-01-11T15:41:55-05:002860512http://forums.asp.net/p/1369791/2860512.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Thanks ( it highlights Datatable, and as i put the cursor over it it says the system the datatable is not defined.)&nbsp; I have used Imports system.data and the error has disappeared. but as i run I can not see any data on the GV gridview! I have tried using <font size="2">ViewState(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;dt&quot;</font></font><font size="2">) = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">True </font> </font></p> <p><font color="#0000ff" size="2"><font color="#0000ff" size="2">but still no data can be seen!</p> </font></font> 2009-01-11T17:57:54-05:002861109http://forums.asp.net/p/1369791/2861109.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p><font color="#0000ff">Do this check in bold&nbsp;</font></p> <font color="#0000ff">Dim</font><font size="2"> dt </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">New</font></font><font size="2"> DataTable</font><font size="2"> </font><font size="2"> <p>dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductID&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</p> dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Productname&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</font><font size="2"> </font><font size="2"> <p>dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductPrice&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</p> dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Quantity&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</font><font size="2"> </font><font size="2"> <p>dt.AcceptChanges()</p> <p>dt.Rows.Add()</p> dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductID&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Id&quot;</font></font><font size="2">)</font><font size="2"> </font><font size="2"> <p>dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Productname&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;name&quot;</font></font><font size="2">)</p> dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductPrice&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;price&quot;</font></font><font size="2">)</font><font size="2">dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Quantity&quot;</font></font><font size="2">) = txtquantity.Text</font><font size="2"> </font><font size="2"> <p>dt.AcceptChanges()</p> <p><strong>Dim str as String = dt.rows.Count //Check the count of Rows</strong></p> <p>GV.DataSource = dt</p> <p>GV.DataBind()</p> </font> 2009-01-12T03:43:55-05:002862184http://forums.asp.net/p/1369791/2862184.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Thanks for the try. I have added the line as you indicated but no changes, still no data appearing on the GV, My pages are using VB language, could this be why? I have replaced the <strong>//</strong> with <strong>' </strong>I have visited you blog and seen that you can help me with if you got the time. Thanks for the assistance. Ibroawad at gmail</p> 2009-01-12T13:14:44-05:002862329http://forums.asp.net/p/1369791/2862329.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>What is the value of str I told you to check at runtime??</p> <p>Also do your Session varaibeles have values??</p> 2009-01-12T14:17:34-05:002862367http://forums.asp.net/p/1369791/2862367.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Yes, my session have values and I have made a labels to display the session values, at the moments since I have used your answer there is no error but nothing appears on the GV, I have trieed ViewState(&quot;dt&quot;) = true but no change.</p> <p>&nbsp;</p> 2009-01-12T14:36:05-05:002862456http://forums.asp.net/p/1369791/2862456.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>In your aspx </p> <p>for thr GridView set Autogenerate Columns = true</p> 2009-01-12T15:17:47-05:002862507http://forums.asp.net/p/1369791/2862507.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>yes it inserted a row into GV.. thanks for that' but as i click another product it olny replaces the new row with the old one. how can I keep the first row and add new one to the GV. Thanks again. </p> 2009-01-12T15:31:07-05:002862524http://forums.asp.net/p/1369791/2862524.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Do this</p> <p><font color="#0000ff">Dim</font><font size="2"> dt </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font size="2">DataTable</font><font size="2"> </font></p> <p>if Session(&quot;GVData&quot;) is Nothing Then</p> dt = new DataTable<font size="2"></font><font size="2"> <p>dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductID&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</p> dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Productname&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</font><font size="2"> </font><font size="2"></font><font size="2"> <p>dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductPrice&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</p> dt.Columns.Add(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Quantity&quot;</font></font><font size="2">, System.Type.GetType(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;System.String&quot;</font></font><font size="2">))</font><font size="2"> </font><font size="2"></font><font size="2"> <p>dt.AcceptChanges()</p> <p>else</p> <p>dt = Session(&quot;GVData&quot;)</p> <p>End If</p> <p>&nbsp;</p> <p>dt.Rows.Add()</p> dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductID&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Id&quot;</font></font><font size="2">)</font><font size="2"> </font><font size="2"></font><font size="2"> <p>dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Productname&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;name&quot;</font></font><font size="2">)</p> dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;ProductPrice&quot;</font></font><font size="2">) = Session(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;price&quot;</font></font><font size="2">)</font><font size="2">dt.Rows(dt.Rows.Count - 1)(</font><font color="#800000" size="2"><font color="#800000" size="2">&quot;Quantity&quot;</font></font><font size="2">) = txtquantity.Text</font><font size="2"> </font><font size="2"></font><font size="2"> <p>dt.AcceptChanges()</p> <p>Session(&quot;GVData&quot;) = dt</p> <p>GV.DataSource = dt</p> <p>GV.DataBind()</p> </font> <p>&nbsp;</p> 2009-01-12T15:40:43-05:002862653http://forums.asp.net/p/1369791/2862653.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc Mudassarkhan You are a STAR, it worked and now I can see all the clicked products; name, price, Id and quantity. my quantity is default value of 1 which is from my QueryString cause I can not hardcode the txtquantity in my DataList to take the entered value to the Basket Page,; Also as I enable the Edit and delete command on my GV as I click edit or delete it will not allowing me to do so. one more thing how can I move this content on the GV into batabase table. Sorry for these many questions. 2009-01-12T16:38:54-05:002862733http://forums.asp.net/p/1369791/2862733.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>loop throght the dataTable</p> <p>Dim dt as DataTable = Session(&quot;GVData&quot;)</p> <p>for i as integer =0 to dt.Rows.Count-1</p> <p>dim strProductID as String = dt.Rows(i)(&quot;ProducID&quot;)</p> <p>dim str<font color="#800000">Productname</font> as String = dt.Rows(i)(&quot;<font color="#800000">Productname</font>&quot;)</p> <p>dim str<font color="#800000">ProductPrice</font> as String = dt.Rows(i)(&quot;<font color="#800000">ProductPrice</font>&quot;)</p> <p>&nbsp;</p> <p><strong>And now insert the data here</strong></p> <p>Next</p> 2009-01-12T17:15:12-05:002864774http://forums.asp.net/p/1369791/2864774.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Mussadarkhan, I have tried as you indicated and now I can insert from the DT memory table into a database table but, it inserting more records than what my order was, how can I avoid that, also is it possible to edit the DT table from the GV? Thanks for the help</p> 2009-01-13T15:40:37-05:002864820http://forums.asp.net/p/1369791/2864820.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p></p> <blockquote><span class="icon-blockquote"></span> <h4>Ibro</h4> <p>Mussadarkhan, I have tried as you indicated and now I can insert from the DT memory table into a database table but, it inserting more records than what my order was, how can I avoid that, also is it possible to edit the DT table from the GV? Thanks for the help</p> <p></p> </blockquote> <p></p> <p><font face="Times New Roman" size="3">All the records are inserted right??</font></p> <p><font face="Times New Roman" size="3">Can you paste the code</font></p> 2009-01-13T16:02:37-05:002866953http://forums.asp.net/p/1369791/2866953.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc As I click The Insert Button one more row is generated and inserted into the Database Table, I have tried to use Variables that can be set to &quot; &quot;&nbsp;after each row is inserted into the memory DT table.&nbsp;&nbsp; but still not working, I tried SESSION.ABANDON but this cancels all the session, is there a way of clicking a bottun should not refresh the page and retrive the queryString again and again, aslo please how can I edit the memory&nbsp; table(DT) columns such as Quantity or deliting a row from&nbsp; it before posting to the databse?&nbsp; Many Thanks&nbsp;&nbsp; <font size="2"></font><font size="2"> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Protected</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Sub</font></font><font size="2"> Order_Click(</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ByVal</font></font><font size="2"> sender </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Object</font></font><font size="2">, </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ByVal</font></font><font size="2"> e </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> System.EventArgs) </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Handles</font></font><font size="2"> Order.Click</p> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> dt </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> DataTable = Session(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;GVData&quot;</font></font><font size="2">)</font><font size="2"> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">For</font></font><font size="2"> i </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Integer</font></font><font size="2"> = 0 </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">To</font></font><font size="2"> dt.Rows.Count - 1</p> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> strProductID </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">String</font></font><font size="2"> = dt.Rows(i)(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;ProductID&quot;</font></font><font size="2">)</font><font size="2"> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> strProductname </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">String</font></font><font size="2"> = dt.Rows(i)(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Productname&quot;</font></font><font size="2">)</p> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> strProductQuantity </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">String</font></font><font size="2"> = dt.Rows(i)(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Quantity&quot;</font></font><font size="2">)</font><font size="2"> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> strProductPrice </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">String</font></font><font size="2"> = dt.Rows(i)(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;ProductPrice&quot;</font></font><font size="2">)</p> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> strUserName </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">String</font></font><font size="2"> = dt.Rows(i)(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Username&quot;</font></font><font size="2">)</font><font size="2"> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> conn </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">New</font></font><font size="2"> SqlConnection(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\CeeJayStore.mdf;Integrated Security=True;User Instance=True&quot;</font></font><font size="2">)</p> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> insertstatement </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">String</font></font><font size="2"> = </font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;INSERT INTO [Orders] ([ProductID], [ProductName], [Quantity],[OrderPrice],[CustomerUserName]) VALUES (@ProductID, @ProductName, @ProductQuantity, @OrderPrice, @UserName)&quot;</p> </font></font><font size="2"></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Dim</font></font><font size="2"> cmd </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">As</font></font><font size="2"> SqlCommand = </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">New</font></font><font size="2"> SqlCommand(insertstatement, conn)</font><font size="2"> <p>cmd.Parameters.AddWithValue(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;@ProductID&quot;</font></font><font size="2">, strProductID)</p> cmd.Parameters.AddWithValue(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;@Productname&quot;</font></font><font size="2">, strProductname)</font><font size="2"> <p>cmd.Parameters.AddWithValue(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;@productQuantity&quot;</font></font><font size="2">, strProductQuantity)</p> cmd.Parameters.AddWithValue(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;Orderprice&quot;</font></font><font size="2">, strProductPrice)</font><font size="2">cmd.Parameters.AddWithValue(</font><font color="#a31515" size="2"><font color="#a31515" size="2">&quot;@username&quot;</font></font><font size="2">, strUserName)</font><font size="2"> <p>conn.Open()</p> <p>cmd.ExecuteNonQuery()</p> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Next</p> </font></font><font size="2"> <p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">End</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Sub</p> </font></font> 2009-01-14T15:14:20-05:002866968http://forums.asp.net/p/1369791/2866968.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Can you paste the code??</p> 2009-01-14T15:22:51-05:002867016http://forums.asp.net/p/1369791/2867016.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>Actually ur Code is fine and it will insert all the rows in ur DataTable.</p> <p>So what you want now don't &nbsp;you want to insert last row then in the loop</p> <p>do</p> <p><strong>for i as integer=0 to dt.Rows.count-2</strong></p> 2009-01-14T15:50:26-05:002869100http://forums.asp.net/p/1369791/2869100.aspx/1?Re+ArrayList+onto+DataControl+Gridview+datalist+etcRe: ArrayList onto DataControl; Gridview, datalist etc <p>I used your xample and also I added&nbsp; DT.CLEAR at the of the insert code and it seems oky for the time being, and one still the last row is appearing on the GV gridview! </p> <p>my Query String which carries the products values takes me to a new page so each taime I want to add another product into my shopping cart I have to go back into the product page, is there a way of having a button in my DataList that can do this for me rather than using the queryString that takes me to another page? Thank very much for the great help.</p> this is my Link in the DataList: <font color="#0000ff" size="2"><font color="#0000ff" size="2"></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"> <p>&lt;</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">asp</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">:</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">HyperLink</font></font><font size="2"> </font><font color="#ff0000" size="2"><font color="#ff0000" size="2">ID</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=&quot;HyperLink1&quot;</font></font><font size="2"> </font><font color="#ff0000" size="2"><font color="#ff0000" size="2">runat</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">=&quot;server&quot;</font></font><font size="2"> </p> </font><font color="#ff0000" size="2"><font color="#ff0000" size="2">NavigateUrl</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">='</font></font><font size="2">&lt;%# &quot;test.aspx?id=&quot;&amp;Eval(&quot;id&quot;) &amp;&quot;&amp;Name=&quot;&amp;Eval(&quot;productname&quot;) &amp;&quot;&amp;Price=&quot;&amp;Eval(&quot;productprice&quot;)&amp;&quot;&amp;Quantity=&quot; &amp;1 %&gt;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">'</font></font><font size="2"> </font><font size="2"> <p></font><font color="#ff0000" size="2"><font color="#ff0000" size="2">Text</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">='</font></font><font size="2">&lt;%# &quot;Add Basket&quot; %&gt;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">'&gt;&lt;/</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">asp</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">:</font></font><font color="#a31515" size="2"><font color="#a31515" size="2">HyperLink</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">&gt;</p> </font></font> 2009-01-15T14:56:50-05:00