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/

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

Password Encryption Using ASP.Net

Password Encryption can be used for encrypting password. Here in this article I am going to explain how you can create the hashed passwords. This method can be used for storing passwords in the credentials section of a database or inside an XML file.

Some of commonly used Hash Encryption Algorithms are ‘MD5‘ and ‘SHA-1

SHA-1 (Secure Hash Algorithm 1) is slower than MD5 but the message digest is larger, which makes it more resistant to brute force attacks. Therefore, it is recommended that Secure Hash Algorithm is preferred to MD5 for all of your digest needs.

Creating Hashed Passwords Using “SHA-1” (Secure Hash Algoritham)

  • Source Code “VB.NET”

    Dim strEncryptPassword As String
    strEncryptPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, “sha1”)

  • Source Code “C#”

    {
    string strEncryptPassword;
    strEncryptPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, “sha1”);
    }

ASP.Net FileSystem Using GridView

To access directory information, we can use either the “Directory” or the “DirectoryInfo” class; in case if we need to access file information, we have to use either the “File” class or the “FileInfo” class.

To display a directory files in a DataGrid ; we have to assign the string array to the DataSource Property and then call the DataGrid using DataBind() Method. We are using DirectoryInfo for listing directory files, however we can also display other attributes like file size etc…

View Demo

Download Source Code

Format of the initialization string does not conform to specification starting at index 0.

Format of the initialization string does not conform to specification starting at index 0

The main cause of this type of error is may be you wrote the connection string inside the quotes like this

Dim myConn As New SqlConnection(“strConnectionString”)

Modify your code like this and try again

Dim myConn As New SqlConnection(strConnectionString)

if you have any suggestions please post reply