In my post last week I initially tried using the jQuery ThickBox plugin to popup a confirmation dialog from an ASP.NET ListView item. I had some trouble at the time getting it to work how I wanted so I moved on to using the SimpleModal plugin. This weekend I decided to go back and try the ThickBox plugin again.
The solution I came up does not require any code in the code behind. I just used some jQuery and the HTML mark up from Matt Berseth’s post where he did much the same thing using ASP.Net 3.5 SP1 Dynamic Data features. One nice thing about this solution is that you could have multiple ListViews on a page with delete buttons and things would work without anymore code.
I am still having one issue with the way the plugin is working. If you click anywhere on the page the dialog will close. If I set the dialog to be truly modal, then I loose the title bar in the dialog which I really don’t want. For now I can live with this. If anyone knows how to fix it please let me know.