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 🙂

Solution

Step 1: Add jQuery and Colorbox

you can download colorbox from https://github.com/jackmoore/colorbox

You can find jQuery Colorbox examples here http://www.jacklmoore.com/colorbox/

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: https://wiki.asp.net/page.aspx/1809/aspnet-listview-item-delete-confirmation-using-jquery-colorbox/

Advertisements

Solution for ASP.NET Error: Could not load file or assembly ‘System.Web.Extensions’

Reason
The Main reason for this error is ‘Your Application uses Microsoft ASP.NET 2.0 AJAX Extensions 1.0 and they had not been installed on your hosting server’

Solution – 1

  1. Download the ‘ASPAJAXExtSetup.msi‘ installer from Microsoft and run it on the live server. The required .dll files would then be inserted into the GAC

Solution – 2

  1.  Your Server did not exhibit the problem, so server obviously had the dll files. Then The Simple Answer is to place a copy of these following files in the applicatiion’s ‘Bin’ folder
    1. System.Web.Extensions.Design.dll
    2. System.Web.Extensions.dll

    You can find these files at C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\