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/

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. SQL Server Management Studio 2008

Error Details:

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table to be re-created.

You need to Disable “Prevent Saving Changes that requires the table re-creation”.

  1. Open SQL Server Management Studio (SSMS) 2008
  2. Click ‘Tools’ Menu
  3. Then Click ‘Options’ as shown
  4. In the navigation pane of the Options window, expand Designers node and select Table and Database Designers option as shown in the below snippet

Risks of Turing Off “Prevent Saving Changes that Require Table Re-creation” in SSMS
If you turn off this feature then you can avoid table recreation. However, if you have the Change Tracking feature of SQL Server 2008 enabled to track the table changes then the change tracking information will be lost completely whenever table is recreated. So, it is always advised to use this feature very carefully especially in a production environment.

System.FormatException: Invalid length for a Base-64 char array.

Exception Details: System.FormatException: Invalid length for a Base-64 char array.

While passing the data through GET, Request.Querystring object interprets the “+” sign as a space, and that causes problems for encoding. This throws error Invalid length for a Base-64 char array. You can resolve this issue using

Example:


While passing the data through GET, Request.Querystring object interprets the “+” sign as a space, and that causes problems for encoding. This throws error Invalid length for a Base-64 char array. You can resolve this issue using

System.Security.Cryptography.CryptographicException The system cannot find the file specified

Error Details: System.Security.Cryptography.CryptographicException The system cannot find the file specified

New Security constraints that were included into the windows server 2008, and a new user CryptoGraphic Operator will be created by default. If your Application is using RSACryptoServiceProvider on windows server 2008 with IIS 7, you can troubleshoot above issue through these steps easily.

  1. INETMGR (IIS 7) > Application Pools > YourApplicationPool > (Right Click) Advanced Settings > Set the Value of “Load User Profile” to “TRUE

IIS 7

Multiple Forms in ASP.NET

In Asp.net Page we can host exactly one server form. I’ve found one good article on MSDN which related to the Form Based Programming in ASP.NET. So We can employ multiple forms in a asp.net page and only one of them can have the runat attribute set to server. The request for the page is therefore processed as usual using the code built in the page base class. Temporary class for the page is generated, compiled and finally loaded.
You can find the Article at http://msdn.microsoft.com/msdnmag/issues/03/05/CuttingEdge/default.aspx

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\