I am very new to VB.net / ASP and have spent hours and hours trying to solve what must be a simple problem - hopefully someone can point me in the right direction.
I have a gridview bound to an MS Access database. A user selects an item which is then added to a datatable, contents appear in a second gridview at the bottom of the page. (Yes it's a simple Shopping Cart) - there are four fields - ID, Product, Quantity, Cost. When the user has finished adding items I want to capture the contents of the second gridview (or the datatable) and transfer it to a multi line textbox on another page, which can then be printed or emailed. : Session("print") = xxxxx Server.Transfer("~/printorder.aspx")
Searching the net has found two export options (Export to Excel / Export to CSV) both these work (HTMLTextWriter) but save a file to disk which doesn't help.
Can anyone explain the best way of extracting the four fields in the datatable / gridview as strings, then adding / appending them to a variable. What is the best way to handle this - a loop, a streamwriter or any other options ??
Any VB examples to get me started would be much appreciated .... even C (I have found translation sites)
Thanks in advance.