What the solution that Jim proposed should generally work, there are easier ways to do this.
On the LinkButton, you can add an OnClientClick directly, with the following code:
OnClientClick="return confirm('Are you sure you want to delete
this item?');"
However, to make that work, you'll need to convert the Delete button into a Template field. The following post gives more details about this:
http://p2p.wrox.com/topic.asp?TOPIC_ID=45586
It also gives an answer to why under certain circumstances your confirmation button no longer seems to delete stuff.
One final note: you don't need the javascript
: prefix in Jim's code. The onclick already indicates that script should be fired.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004