Hi,
I have a products page which has ListView control taking data from ObjectDataSource. This LisView shows sub product list with product code, name and price. And each line in ListView has a button to add these products to a list.
When I click to one of these buttons, on button_click event, I would like to get the product id of clicked row. And I wonder what is the easiest way to do that?
Thank you.
Getting values from ListView
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Rakrus106 reputationPosted Feb 14, 2008, 12:59 AM EST
Hi,
Try this
listview_itemdatabound (or) listview_rowdatabound
{
string productId=listview.DataKeys.Values[0].ToString();
}