Hi All,
I need some help once again.
I have a ListView control which all works fine with Edit & Delete command buttons in the ItemTemplate. This gathers basic text information regarding a review. However I have also added an additional button to the ItemTemplate which is used to re-direct users to another page to add related pictures for the specific ID which relates to the current ListViewItem's ID. i.e an individual review with multiple pictures.
I want to do this by using a QueryString from the ListViewItem button that is clicked to specify the ID of the record that the pictures need to be added to. Seems simple, however, what I cannot seem to get right is the SelectedIndex of the ListViewItem that has been clicked (when I click my own button) so that I can identify the value of the ID to be passed in the QueryString.
I have added sample code and when I click my manually created button in the ListViewItem the SelectedIndexChanged event is not raised so I am not sure what I can evaluate to get the ID efficiently?
I have actually got round this issue by binding the ID of each record to the ValidationGroup property of each button in the ListViewItem when the ListView is created (exactly the same as you use the tag property in straight
VB/C# coding) which I can then evaluate and pass to the QueryString but what I realise is that there must be a more efficient and better way to do this?
Can anyone help?
Kind regards,
Ian Ryder.