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.
Loading
RakrusPosted Feb 14, 2008, 5:59 AM
Hi,
Try this
listview_itemdatabound (or) listview_rowdatabound
{
string productId=listview.DataKeys.Values[0].ToString();
}