ASP.NET ListView Item Delete Confirmation using jQuery Colorbox

The other day I was working on a .NET project I needed to perform a delete confirmation using jQuery Colorbox in ASP.NET ListView. After I spend long hours on internet I couldn’t find solution and come up with this idea. Hope you will enjoy it 🙂


Step 1: Add jQuery and Colorbox

you can download colorbox from

You can find jQuery Colorbox examples here

Step 2: Add the following inside < head > tag

Step 3: ASP.Net Listview using CommandArgument to delete the item


You can find much detailed information from ASP.NET Wiki:


Datalist With Empty ROW

Showing Empty Row is just simple… only you need to do this in your page.

Datalist Empty Row

Steps to do

theDataList.DataSource = pagedData

If theDataList.Items.Count = 0 Then
theDataList.Visible = False
lblError.Visible = True
theDataList.Visible = True
lblError.Visible = False
End If