RE: Encryption for QueryString

From: David Coe, MCP (anonymous_at_discussions.microsoft.com)
Date: 05/31/04


Date: Sun, 30 May 2004 21:36:03 -0700

There is nothing wrong with using your own en/decrpytion methods ... so long as you are using some of the built in classes in the System.Security.Cryptography namespace. Using the aspnet_setreg.exe utility will not help you with this, since it is intended to encrypt items from your web.config file and store them in the registry.

The DPAPI may work, and does an excellent job of managing keys for you, but I have only seen that used in cases where you are encrypting items to be stored in the web.config file ... I have not seen it used for on the fly encryption, but I'm not saying it's not possible.

To answer your other question regarding encrypting the URL in the DataGrid, you could use the code behind support and select the column and set the URL appropriately, such as:

((HyperLinkColumn) grid.Columns[0]).NavigateUrl = "mypage.aspx?id=" + encrypt(value)