Hi friends, I need your help, I have a products table with 3 fields name, price and quantity, I need to fill a datatable with those 3 fields and using a foreach build a chain.
I build my chain currently using a datagrid with my following code
this code work good.
string item_name;
string amount;
string quantity;
string URL = "";
int i;
item_name = "&item_name_";
amount = "&amount_";
quantity = "&quantity_";
URL += "https://www.paypal.com/cgi-bin/webscr?";
i = 0;
foreach (GridViewRow row in this.Basket.Rows)
{
Label name11 = ((Label)row.FindControl("lblName"));
Label Amount11 = ((Label)row.FindControl("lblAmount"));
Label quantity11 = ((Label)row.FindControl("lblquantity"));
i = i + 1;
URL = URL + item_name + i.ToString() + "=" + name11.Text;
URL = URL + amount + i.ToString() + "=" + Amount11.Text;
URL = URL + quantity + i.ToString() + "=" + quantity11.Text;
}
but I like to form my chain directly from datatable, not rely on a datagrid.
i am work whit paypal, thanks for all your help,.