Hello Imar,
in the Genre GridView (chapter 13) I added the following property to the Delete button (which I had converted from a CommandField to an ItemTemplate):
Code:
OnClientClick="return confirm('Do you really want to delete the selected genre ?');"
in order to prevent unintentional deletes.
It works, but I would like to refine it.
I would like to concatenate the name of the genre selected so that the message to the user turns, for instance, into:
'Do you really want to delete the Hard Rock genre ?'
I'm trying to do that by means of a Javascript function, but I got an error at
Code:
document.getElementById('<%= labelGenreName.ClientId%>')
Therefore I cannot reach the Label whose value is the name of the genre.
By the way, the label is into an ItemTemplate, as I converted the original BoundField into a Template.
Can you tell me how to concatenate the name of the genre into the message ?
Thank you